// printng a multiplication table // Mikhail Nesterenko // 4/12/2013 #include using std::cout; using std::endl; int main(){ // Declare a 10x10 array const int rows = 10; const int cols = 10; int products[rows][cols]; // calculate a multiplication table for (int i=0; i < rows; ++i) for (int j=0; j < cols; ++j) products[i][j] = i * j; // print it for (int i = 0; i < rows; ++i){ for (int j = 0; j < cols; ++j) cout << products[i][j] << "\t"; cout << endl; } }