Thank you sooo much for all your help. The program worked once I changed it all to C++, however, the other program (part two) didn't come out like this:
1111 111 11 1
2222 222 22 2
3333 333 33 3
4444 444 44 4
5555 555 55 5
Am I doing something wrong? I changed > and < around, but it is coming out like this:
1 11 111 1111
2 22 222 2222
3 33 333 3333
4 44 444 4444
5 55 555 5555