1. Engineering
  2. Computer Science
  3. in c write both an iteration and recursive function for...

Question: in c write both an iteration and recursive function for...

Question details

In C, Write both an iteration and recursive function for the following functions.

4. The gretest common divisor gcd(x,y) where gcd(x, y) = x, if y=0 otherwise gcd(x, y) = gcd(y, x MOD y), if y > 0

    5. The function Power(a,b), where Power(2,4) = 2 * 2 * 2 * 2
  1. A function to display (print) that displays all the positive integers

           that are less than the value of n and divdisable by m, where m < n
    
  2. DrawTriangle(n); Would display one * on the first line, then one more

           each line until it displays a line with n *s.
           Example: DrawTriangle(4) would display:
    

*

**

***

****

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution