recent

C Program To Find Factorial Of Number Without Using Function

#include<stdio.h>

main()
{

int i,n,fact=1;

printf("Enter no. for factorial:\n");
scanf("%d",&n);

for(i=n;i>1;i--)
{

fact=fact*i;

}
printf("Fact is %d\n",fact);

}
Powered by Blogger.