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
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is string concatenation in c?
What is a pointer in c plus plus?
What is typeof in c?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Is c pass by value or reference?
Does sprintf put null character?
What is a pointer variable in c language?
Explain how do you print an address?
in iso what are the common technological language?
Write a program that accept anumber in words
What does s c mean in text?
What is a #include preprocessor?
What do you mean by c what are the main characteristics of c language?
what is the difference between 123 and 0123 in c?