Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program that finds the factorial of a number using
recursion?

Answer Posted / danish

>
#include<conio.h>
int fact(int);
void main()
{
int num,fact1;
clrscr();
printf("Enter a value of num");
scanf("%d",&num);
fact1=fact(num);
printf("factorial=%d",fact1);
}
int fact(int n)
{
if(n==0)
{
return 1;
}
else
{
return

Is This Answer Correct ?    13 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between main and void main?

1203


What are the disadvantages of external storage class?

1054


What does. int *x[](); means ?

1063


What is %s and %d in c?

1035


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(

2250


What is pointer and structure in c?

1166


What is the explanation for prototype function in c?

975


What is infinite loop?

1081


State two uses of pointers in C?

1051


How can I make sure that my program is the only one accessing a file?

1261


Describe newline escape sequence with a sample program?

1114


What is unsigned int in c?

993


write a proram to reverse the string using switch case?

2931


What is the difference between declaring a variable and defining a variable?

1267


Explain why c is faster than c++?

1066