answersLogoWhite

0

How do you wrte ac programe for factorial?

Updated: 8/18/2019
User Avatar

Wiki User

13y ago

Best Answer

#include <stdio.h>

int main()

{

int fact=1,num;

printf("Enter number: ");

scanf("%d",&num);

if((num==0) (num==1))

{

printf("Factorial = %d",fact);

return 0;

}

else

{

while(num!=1)

{

fact=fact*num;

num--;

}

printf("Factorial = %d",fact);

return 0;

}

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you wrte ac programe for factorial?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you wrte aC program in Linux?

OK. Done that


How do egyptians wrte?

hieroglyphics


What is the value of 9 factorial plus 6 factorial?

The value of 9 factorial plus 6 factorial is 363,600


What is 30 factorial divided by 27 factorial times 3 factorial?

It is 4060.


What is factorial of 998?

factorial of -1


How do you wrte a sentence with the word relation?

economy


How do you wrte a program to compound interest?

#include


How do you wrte a sentence using word were?

Where were you yesterday?


What is the most watched tv programe?

Espn


What is 26 factorial?

26 factorial is 403,291,461,126,605,635,584,000,000


What is 1 factorial?

1 factorial = 1


What is the factorial of 27?

27 factorial = 10,888,869,450,418,352,160,768,000,000