write a programe to find the factorial of given number
using recursion
Answer Posted / hari
int fact(int n)
{
if(n==1)
return 1;
else
return(n*fact(n-1));
}
for further queries and discussions, just check these out !!!
http://forum.campusmaniac.com/
http://www.campusmaniac.com/
Is This Answer Correct ? | 13 Yes | 4 No |
Post New Answer View All Answers
Can a program have two main functions?
What is the -> in c?
How can I get the current date or time of day in a c program?
What are disadvantages of C language.
How do we declare variables in c?
When should a type cast be used?
What is a macro in c preprocessor?
What is the scope of static variables in c language?
Why can’t we compare structures?
What are the 5 organizational structures?
How can I get back to the interactive keyboard if stdin is redirected?
What is difference between Structure and Unions?
What is keyword in c?
What are examples of structures?
In C programming, what command or code can be used to determine if a number of odd or even?