1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Programing Using For loop

Discussion in 'C' started by Peepin, Dec 8, 2011.

  1. Peepin

    Peepin New Member

    Joined:
    Dec 7, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    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 a moderator: Dec 9, 2011
  2. Peepin

    Peepin New Member

    Joined:
    Dec 7, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    What Code blocks
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Clicking the link can help
     
  4. sura

    sura Banned

    Joined:
    Aug 4, 2011
    Messages:
    47
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    India,Tamil Nadu.
    cool but try more advance next time.
     

Share This Page