Wednesday, 12 December 2012
FACTORIAL NUMBERS
FACTORIAL PROGRAM WITHOUT FUNCTION
#include<stdio.h>
void main()
{
int fact=1,i,x;
printf("enter the no in factorial");
scanf("%d",&x);
for(i=1;i<=x;i++)
{
fact=fact*i;
}
printf("%d ",fact);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment