Programing Using For loop

Newbie Member
9Dec2011,00:45   #1
Peepin's Avatar
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
Newbie Member
9Dec2011,21:14   #2
Peepin's Avatar
What Code blocks
Go4Expert Founder
9Dec2011,21:23   #3
shabbir's Avatar
Clicking the link can help
Banned
9Dec2011,23:12   #4
sura's Avatar
cool but try more advance next time.