Calculation of Factorial of a Number

This program calculates the Factorial of a number.

Factorial is represented by the ! sign..

For E.g. 5! = 5*4*3


Write a program to find the factorial value of any number entered
through the keyboard.


#include<stdio.h>
main()
{
int number, factorial, temp;

printf("Enter the number whose factorial is to be calculated:");
scanf ("%d", &number);

temp=1;

factorial=1;

while (temp <= number)

{

factorial=factorial*temp;

temp++;


}

printf("The factorial of the entered number is:%d", factorial);
}



The file can be found at:
Download File.

Comments

saurabh said…
explain working of each step clearly so every one can understand easily
Unknown said…
thanx a lot .it heped me a lot
Unknown said…
thanx a lot .it heped me a lot
vicky said…
thx yaar maza aa gaya me kab se soch rahaa tha kaise karu choti choti mistake ho rahi thi par ab ho gaye thank u
Anonymous said…
how this progarm works
Unknown said…
bahut easily samajh me aaya kafi der se is program k liye pareshan thi thanx alot
Unknown said…
thank you i am begginer and it helped alot i can compile it in mid.. i think it works
pradeep said…
it helped alot ty:)
Anonymous said…
Thank You.Good Program without using recursion
pulkit said…
m a comp engineer dun even to make a single prgramme ..but gat alot of helop from u
pulkit said…
i gt ap of help from this site.//.:) thnx alot
Sheenu Singla said…
Good Solution.
This Program is really very fantastic.
ahmadjawad786 said…
i m the new comer of programming language .
i thanks a lot of you ... this is helpful for me ...
IRA said…
what temp mean?
kashif chishti said…
thank u very much sir i realy nead it.......
syed said…
so easy way to understand
Saeed Badal said…
thanks dear for your help as it is my programing paper today
Unknown said…
Not working after 8
basant kumar said…
factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
BASANT KUMAR said…
igtools The term”gigolo” usually refers to the person who lives an arranged lifestyle that includes many of these relationships in a series, rather than having any other support system.
sniffies Sniffies is a location-based networking application specifically designed for gay, bi trans, queer and curious males who want to meet other like-minded individuals to discover their sexuality.
y2mate-com The website of Y2mate has standard ads like a pop-up asking you to give access to the notifications on your phone.
erome Finding the perfect woman or keeping track of the man who posts footage of his gorgeous wife having a sexy time are the main challenges for amateur porn.

Popular posts from this blog

C Program - Calculation of Area and Circumference of a Circle using Pointers

Matchstick Game using C Programming

C Program to Calculate Factorial of a number using Recursion