//calculating factorial of number that is n!=n*(n-1)*(n-2)…..3*2*1
#include<stdio.h>
void main()
{
int fact=1,n;
printf(“enter the number”);
scanf(“%d”,&n);
while(n!=0)
{
fact=fact*n;
n=n-1;
}
printf(“the factorial of a number is =%d”,fact);
}
OUTPUT

Note:-in Dev C++ the size of an integer is 4 byte. So it gives the output of those input whose output is in the range of 0 to 2^(32)-1 for unsigned and -2^32 to (2^32)-1 for signed integer.(since 4 byte=8*4=32 bit)
