Need quick help, stuck on project.

Discussion in 'Programming General' started by youknowwho, Mar 21, 2012.

Need quick help, stuck on project.
  1. Unread #1 - Mar 21, 2012 at 11:06 AM
  2. youknowwho
    Joined:
    Jun 5, 2005
    Posts:
    484
    Referrals:
    0
    Sythe Gold:
    44

    youknowwho Forum Addict

    Need quick help, stuck on project.

    ok so i am having a hell of a time figuring out what i am doing wrong. On the right of the picture you see what it is supposed to be.

    3##
    #3#
    ##3

    and i have my loop of what i think it is supposed to be but it turns out how it is in the picture.

    http://imgur.com/2ONHg
     
  3. Unread #2 - Mar 21, 2012 at 11:06 PM
  4. Slash GnR
    Joined:
    Mar 21, 2012
    Posts:
    139
    Referrals:
    0
    Sythe Gold:
    0

    Slash GnR Active Member
    Banned

    Need quick help, stuck on project.

    Hi, i was looking at your loop and found that the loops are just doing the same thing, both of them. like, the what the first loop does, the second loop gives the value of first as well as what the loop should have done, which in this case is same as the first one, and this keeps repeating since j <=3, repeats 3 times.
    "cout<<left<<setfill('#)<<setw(3);"
    is a bad logic, as it is only gonna print 3 and ##, makes no sense.

    you should try putting an if statement checking if i==j, cout 3, and then the else #, i think that should do it, and you must fix the loop too. I know this wasnt able to write it for you, but if you give me the whole program i can debug it for you.
     
< Drawing in python | Link that "scrolls" >

Users viewing this thread
1 guest


 
 
Adblock breaks this site