#include<stdio.h>
main()
{
int num,fact=1,i;
printf("Enter a number to check its factorial:\n");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
fact=fact*i;
}
printf("fact of %d is=%d",num,fact);
return 0;}
OUTPUT
Developers Are Born Here!
Subscribe For New Post Notifications
No comments: