Programing Using For loop

Peepin's Avatar, Join Date: Dec 2011
Newbie Member
Code:
/* program to print factorial of a number Dev. by Peepin :) */
#include<stdio.h>
main()
{
            int i,n,fact=1;
            printf("Enter A Number\n");
            scanf("%d",&n);
            for(i=1;i<=n;fact*=i,i++);
            printf("%d Factorial Is %d\n",n,fact);
}
/* ENJOY */

Last edited by shabbir; 9Dec2011 at 09:18.. Reason: Code blocks
Peepin's Avatar, Join Date: Dec 2011
Newbie Member
What Code blocks
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Clicking the link can help
sura's Avatar
Banned
cool but try more advance next time.