1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#include <iostream>
using namespace std;
int main()
{
int userSelect{ 0 };
const int ROWS = 4;
const int COLS = 8;
int numberTable[ROWS][COLS] =
{
{ 1, 2, 3, 4, 5, 6, 7, 8 },
{ 7, 2, 8, 4, 5, 4, 7, 3 },
{ 9, 9, 7, 4, 9, 9, 8, 7 },
{ 6, 3, 7, 4, 5, 4, 5, 7 }
};
cout << "Which Row would you select to see?" << endl;
cin >> userSelect;
for (int count = 0; count < COLS; count++)
cout << numberTable[userSelect - 1][count] << " ";
cout << endl;
return 0;
}
|