Print * code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aashrith
    New Member
    • Nov 2007
    • 3

    Print * code

    Can any body send the code.

    My requirement is to print "*" like *
    **
    ***
    ****
    *****
  • chella
    New Member
    • Mar 2007
    • 51

    #2
    Originally posted by aashrith
    Can any body send the code.

    My requirement is to print "*" like *
    **
    ***
    ****
    *****
    Hi aashrith,

    Send us what you have tried so far. Tell us where you have the problem.

    Experts here are to help you.

    Regards,
    chella

    Comment

    • AnilM823
      New Member
      • Jan 2007
      • 9

      #3
      As mentioned above, simply sending you the code won't help. Have you attempted this?

      As a hint, try using a for loop, with a while loop nested inside (two counter variables)...

      Comment

      • ginee
        New Member
        • Nov 2007
        • 1

        #4
        Hai ...Try this

        for (int i=0;i<10;i++)
        {
        for( int j=0;j<i;j++)
        {
        cout<<"*";
        }
        cout<<"\n";
        }

        Comment

        Working...