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.

## 19 comments:

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

thanx a lot .it heped me a lot

thanx a lot .it heped me a lot

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

how this progarm works

thnx

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

Thank You.Good Program without using recursion

m a comp engineer dun even to make a single prgramme ..but gat alot of helop from u

i gt ap of help from this site.//.:) thnx alot

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 ...

what temp mean?

thank u very much sir i realy nead it.......

so easy way to understand

thanks dear for your help as it is my programing paper today

Not working after 8

Post a Comment