Hey all, I'm having a little trouble with a homework problem. Here it is:
Write a problem that creates the following pattern:
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7
1 2 3 4 5 6
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Now I know that this will involve nested for loops, but every attempt I've made gives me results like:
999999999
888888888
777777777
666666666
555555555
444444444
333333333
222222222
111111111
Any ideas?