print using for loops

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suppaduppa
    New Member
    • Oct 2006
    • 5

    print using for loops

    1
    22
    333
    4444
    55555......
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Did you have a question?

    Comment

    • cyberking
      New Member
      • Jan 2007
      • 84

      #3
      Originally posted by suppaduppa
      1
      22
      333
      4444
      55555......
      Hi..

      This is not a good idea to come and ask us to do your assignments.
      However, here goes the code.

      Code:
      #include<stdio.h>
      
      void main()
      {
        int i,n;
        printf("Please enter the number");
        scanf("%d",n) ;
      
      
       for( a=1;a<n;a++)
       {
            
          for(j=1;j==a;j++)
          {
             
             
            label: printf("%d", a);   
          
             if(j==a)
             printf("\n");
             else
             goto label;
             
             j++;
          }
      
            a++;
      
       }

      Comment

      Working...