Hi I'm new to this c++ programming and im struggling with this array program.
I need to get array looking like this
[11,12,13,14,15
21,22,23,24,25
31,32,33,34,35]
and I also need to solve it using two functions: Functions which gets me to these numbers, and fuction which prints out this multidimensional array. Then I have to put them in main function.
I Think i need to use something like this:
1 2 3 4 5 6 7 8
for (n = 0; n < 3; n++)
{
for (m = 0; m < 5; m++)
{
matrica[n][m] = (n + 1) * (m+1);
cout << matrica[n][m] << " ";
}
cout << endl;
Thank you I got it. Now im having problems with another taks. I have to write a program which adds up matrices. I keep writing them while either entered row is 0 or column. When 1 of them is 0 I got to exit the loop and finish the program. If dimensions are different than 0 I have to add them up, print result and repeat input. This is how far I managed to come: