Professional Documents
Culture Documents
Extra Sheet 3: This Sheet Is Not Required To Be Delivered As Assignment
Extra Sheet 3: This Sheet Is Not Required To Be Delivered As Assignment
Extra Sheet 3
1. Write a recursive function that prints the numbers 1…n in descending order.
2. Write a recursive function that prints the numbers 1…n in ascending order.
3. Write a function that takes in two numbers and recursively multiplies them together.
4. Write a recursive function convert a decimal number into a binary number, printing the
binary number
5. Write a recursive function to find sum of first n natural numbers.
6. Write a recursive function that finds and returns the minimum element in an array, where
the array and its size are given as parameters.
int findmin(int a[], int n)
7. Write a recursive function that determines whether an array is a palindrome, where the
array and its size are given as parameters.