Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Programing Using For loop (http://www.go4expert.com/forums/programing-using-loop-t27317/)

Peepin 9Dec2011 00:45

Programing Using For loop
 
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 */


Peepin 9Dec2011 21:14

Re: Programing Using For loop
 
What Code blocks

shabbir 9Dec2011 21:23

Re: Programing Using For loop
 
Clicking the link can help

sura 9Dec2011 23:12

Re: Programing Using For loop
 
cool but try more advance next time.


All times are GMT +5.5. The time now is 19:28.