Some help please

I need to create a program that out puts the following using loops:

(0,0)(0,1)(0,2)(0,3)(0,4)
(1,0)(1,1)(1,2)(1,3)(1,4)
(2,0)(2,1)(2,2)(2,3)(2,4)
(3,0)(3,1)(3,2)(3,3)(3,4)
(4,0)(4,1)(4,2)(4,3)(4,4)

I've been able to get:
01234
11234
21234
31234
41234

or something like that (I don't have the code in front of me right now.)

I've looked around and couldn't find a solution to what I was doing wrong, and being new to C++ (Been using it for about 10 weeks) i'm stuck.

I appreciate any help/response.

1
2
3
4
5
6
7
8
for(int i = 0; i < 5; i++)
{
    for(int k = 0; k < 5; k++)
    {
         cout << "(" << i << "," << k << ")";
     }
     cout << endl;
}
Ok, I see where I screwed up.

Thanks a lot!
no problem :)
Topic archived. No new replies allowed.