help?

You have a 2D array of integers, as seen in the main function. The program will prompt the user for a single integer. You must add the user's value to each of the values in the 2D array using the 'addValue' function, as seen in the main function. Then, write the 'print' function to print out the values in the array with each row of the array on its own line, and each number in each row separated by a single whitespace.

NOTE: You should NOT print a whitespace after the last number on each line.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  #include <iostream>

using namespace std;

int main()
{
     int my_array[2][2] = {{5,4},{23,-1}};

     int value;
     cin >> value;

     addValue(my_array, value);

     print(my_array);

     return 0;
}
What have you tried so far?
i dont know really know where to start. 2D arrays are kind of confusing me. I am VERY new to programming
closed account (167fizwU)
the coordinates of array problem
Topic archived. No new replies allowed.