## Friday, July 21, 2006

### 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:

saurabh said...

explain working of each step clearly so every one can understand easily

thanx a lot .it heped me a lot

Muktika said...

thanx a lot .it heped me a lot

chintoo 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

rash.rubel said...

thnx

ISHRAT said...

bahut easily samajh me aaya kafi der se is program k liye pareshan thi thanx alot

thank you i am begginer and it helped alot i can compile it in mid.. i think it works

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.

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