Program to find factorial using FOR loop
#include<stdio.h>
int num,count,fact = 1;
int main()
{
printf("Enter the number:");
scanf("%d",&num);
for(count = 1;count <= num;count++)
fact = fact * count;
}
printf("Fact of %d is %d",num,fact);
Comments
Post a Comment