pika29chu

01-09-2005, 12:34 AM

hi,

im stuck on a bit of programming in C++.

say for example, i have the following code:

for(int i=1; i<6; i++)

{

for(int j=1; j<6; j++)

{

int number = i+j;

cout << number << endl;

}

}

the function above would obviously add i+j together so you get numbers from 2 to a maximum of 10.

however, what i would really like to do is combine the two integers.

so instead of having 1+1 = 2... i would like 1 and 1 = 11 or 2 and 1 = 21. if you understand what i mean? i basically would like to combine the two integers together.

does anyone know how to write the code for this please?

help in this matter would be much appreciated... thank you!

alex

im stuck on a bit of programming in C++.

say for example, i have the following code:

for(int i=1; i<6; i++)

{

for(int j=1; j<6; j++)

{

int number = i+j;

cout << number << endl;

}

}

the function above would obviously add i+j together so you get numbers from 2 to a maximum of 10.

however, what i would really like to do is combine the two integers.

so instead of having 1+1 = 2... i would like 1 and 1 = 11 or 2 and 1 = 21. if you understand what i mean? i basically would like to combine the two integers together.

does anyone know how to write the code for this please?

help in this matter would be much appreciated... thank you!

alex