69. Find factorial of a number
#include<stdio.h>
void
main()
{
int i,num,fact=1;
printf("Find factorial of a
number\n");
printf("Enter the number: ");
scanf("%d",&num);
for(i=1;i<=num;i++)
fact=fact*i;
printf("Factorial value of %d is
%d\n",num,fact);
}
Comments
Post a Comment