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 does typeof return in c?

1018


What is the value of h?

985


Why is this loop always executing once?

998


What is the use of a static variable in c?

1006


What does %d do in c?

907


What was noalias and what ever happened to it?

976


What are structure types in C?

1048


What is extern variable in c with example?

948


what are # pragma staments?

1998


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2304


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2044


What are formal parameters?

1066


What is the correct code to have following output in c using nested for loop?

1026


What Is The Difference Between Null And Void Pointer?

1155


write an algorithm to display a square matrix.

2640