• Log in or sign up for an account here: https://www.sythe.org/login

Need quick help, stuck on project.

youknowwho

Forum Addict
Joined
Jun 5, 2005
Sythe Gold
44
Messages
484
Age
35
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
 
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.
 
Runescape Gamblingrunescape gambling
Back
Top