Sample exam questions and/or practice problems for your reference only 52) Canning Problem 43: Recursive Factorial -Use a function! One way to express the definition of the factorial of a number is N! is N x (N-1) x (N-2) x (N-3) x (N-4) x .x3 x 2x1 Mathematicians define 0! to be 1. For examples, 3! is 3 x2x 1 which is equal to 6 Write a C program that computes and outputs to standard output the factorial of a number. Your function main should read in either the value 0 or a positive integer value from standard in and then output the factorial of the number. Your program must call a factorial function. This function cannot and should not print the answer. It should return the number back to the main function. The main function should print the answer The factorial function should use a recursive strategy and should take only a single argument 53) Write a function declaration and a complete function definition for a function named validate that will accept three parameters of type double and return 1 (true) if all parameters have values in the range between 25 and 55, including the end points, and 0 (false) otherwise. 54) Canning Problem 37: Greek mathematicians took a special interest in numbers that are equal to the sum of their proper divisors. A proper divisor of n is any number that evenly divides n that is less than n itself. For example, 6 is a perfect number because it is the sum of 1, 2, and 3 which are the factors of 6 that are less than 6. Similarly, the number 28 is a perfect number because 1+ 2+4+7 14 add up to 28 You are to write a program that contains a function called IsPerfect that takes an integer n and retums true (1) if n is perfect and false (0) otherwise. Your program should output all of the perfect numbers between 1 and 100,000. There is no need to input the number 100,000. 55) Canning Problem 13: Write a C program that reads a single integer value from the keyboard. The number could be either a negative number a positive number, or zero. Your program should call the bsolute value function abs - and it then prints out the absolute value of the number entered. Browse appendix D to determine which header file you should include. Your textbook is your best friend. I do not want you to create your own absolute value function. Make sure that your code looks snappy 
52)
 Factorial if a number using Recursion
 #include<stdio.h>
 #include<condo.h>
 int fact(int);
 main()
 {
   int num,f;
 clrscr();
 printf(\"\ Enter anumber:\");
 scanf(\"%d\",&num);
 f=fact(num);
 printf(\"\ Factorial of %d is: %d\",num,f);
 getch();
 }
 int fact(int n)
 {
    if(n==1 || n==0)
        return 1;
    else
        return(n*fact(n-1));
 }
 53)
 bool validate(double,double,double);
 bool validate(double n1,double n2,double n3)
 {
 if((n1>=25&& n1=55) &&(n2>=25 && n2<=55) && (n3>=25 && n3<=55))
 return true;
 else
 return false;
 }
 55)Using abs function
 56).Using sqrt function
 #include<conio.h>
 59)
 double multiply( double,double);
 double multiply(double a,double b)
 {
 return a*b;
 }
 60)Factorial if a number using for loop
 
 #include <stdio.h>
 #include<conio.h>
 main()
 {
 int n, i;
 unsigned lonf factorial = 1;
 clrscr();
 printf(\"Enter an integer: \");
 scanf(\"%d\",&n);
 if (n < 0)
 printf(\"Error! Factorial of a negative number doesn\'t exist.\");
 else
 {
 for(i=1; i<=n; ++i)
 {
 factorial *= i;
 }
 printf(\"Factorial of %d = %llu\", n, factorial);
 }
 getch();
 }