#include "pch.h" #include #include using namespace std; int main() { } // A function that counts 1..N // Multiply // mul(3, 5) = 15 // mul(7, 3) = 21 // A function that adds 1..N // sum(1) = 1 // sum(3) = 6 // sum(-4) is an illegal question // a function that computes the factorial of n. // fac(3) = 6 // 3*2*1 // fac(5) = 120 // 5*4*3*2*1 // Make a method that computes A to the Bth power // power(3, 5) -> 243 // power(2, 3) -> 8 // power(0, 1) -> 0 // power(0, 0)->anything you want // Djikstra's GCD algorithm // gcd(a, b)->a if a == b // gcd(a, b)->gcd(a - b, a) if a > b // PrintBackwards // printBackwards("pretty") should print "yttep".It returns nothing. // printBackwards("gene") should print "eneg".It returns nothing. // IsPalindrome // isPalindrome("abba") = true // isPalindrome("fred") = false // isPalindrome("") = true and does not crash