1234567891011121314151617181920212223242526
#include <iostream> #include <fstream> using namespace std; int main() { const int ROW = 4; const int COLS = 5; int grid[ROW][COLS]; ifstream infile; infile.open("numbers.txt"); if(infile.fail()) { cout << "Sorry, could not open input file!\n"; exit(1); } for(int i=0; i < ROW; i++) { for(int j=0; i < COLS; j++) { infile >> grid[i][j]; } } infile.close(); }