1 Answers
Code:
#include<stdio.h>
int main()
{
int n,i;
int m =1;
printf(“enter number for factorial “);
scanf(“%d”,&n);
for(i=1;i<=n;i++)
m=m*i;
printf(“value of factorial=%d”,m);
//Chetan Shidling
return 0;
}
//CS Electrical & Electronics
Output:
enter number for factorial 4
value of factorial=24