Question #243460

Prepare a c++ program using two-dimensional array

310
220
800
1000

Expert's answer

#include <iostream>
int main()
{
    int arr[4][1] = {{310}, {220}, {800}, {1000}};
    for (int i = 0; i < 4; i++) {
        std::cout << arr[i][0] << std::endl;
    }
    return 0;
}
//OUTPUT:
//310
//220
//800
//1000

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS