answersLogoWhite

0

How do you wrte ac programe for factorial?

User Avatar

Anonymous

∙ 15y ago
Updated: 8/18/2019

#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

∙ 15y ago
Copy

What else can I help you with?

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 the most watched tv programe?

Espn


What is factorial of 998?

factorial of -1


How do you wrte a program to compound interest?

#include


How do you wrte a sentence with the word relation?

economy


How do you wrte a sentence using word were?

Where were you yesterday?


What is factorial of six?

Factorial 6 = 720


What is the factorial of 27?

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


What is 1 factorial?

1 factorial = 1

Trending Questions
Where is the outfit for scarecrow in Toy Story 3? What is the chemical name for HCO3Na? Change 2.65 into a percent? Is luck a bad word? How do deaf people wake up in the morning? What times does westfild cloSe on a bank hoilday? What are the differences between Chinese eggplant and regular eggplant in terms of taste, texture, and cooking methods? What is the best punk rock hairstyle for a heart shaped face? When did Hermione Granger buy Crookshanks? What is the value of a 1951 US 2 dollar bill with a red seal? When is best time to see area spring flowers in bloom in Winston-Salem NC? Effects of an earthquake differ in countries at different stages of development? What do the colours of the Bulgarian flag signify? Does peaceful mode come with Minecraft? Why are the Canadian lynx threatened? What if I die? Is cool whip a colloid? Who is the president of Louisiana? What are the key features and benefits of the SRAM Apex 2x10 groupset? Account for the responses of the European democracies to the military aggression by Italy and Germany during the 1930?

Resources

Leaderboard All Tags Unanswered

Top Categories

Algebra Chemistry Biology World History English Language Arts Psychology Computer Science Economics

Product

Community Guidelines Honor Code Flashcard Maker Study Guides Math Solver FAQ

Company

About Us Contact Us Terms of Service Privacy Policy Disclaimer Cookie Policy IP Issues
Answers Logo
Copyright ©2025 Infospace Holdings LLC, A System1 Company. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Answers.