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