computing-fundamentals
C programs and question bank.
Wednesday, October 27, 2010
factorial-c
void main()
{
int f=1,i,n;
printf(“Enter the value”);
scanf(“%d”,n);
for(i=1;i<=n;i++)
f=f*i;
printf("factorial of %d is %d",f);
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment