#include <iostream> int main() { const unsigned rows = 3 ; const unsigned cols = 5 ; for ( unsigned row=0; row < rows; ++row ) for ( unsigned col =0; col < cols; ++col ) std::cout << '(' << row << ',' << col << ") = " << row * cols + col << '\n' ; }
Standard input is empty
(0,0) = 0 (0,1) = 1 (0,2) = 2 (0,3) = 3 (0,4) = 4 (1,0) = 5 (1,1) = 6 (1,2) = 7 (1,3) = 8 (1,4) = 9 (2,0) = 10 (2,1) = 11 (2,2) = 12 (2,3) = 13 (2,4) = 14