#include <iostream>
int main()
{
// try changing the value of N to 4 and see what the output would be
constint N = 3 ;
// outer loop (each iteration through the loop prints one line)
for( int i = 0 ; i < N ; ++i ) // for each of the N lines
{
// nested inner loop (each iteration through the loop prints one number)
for( int j = 0 ; j < N ; ++j ) // print each of the N numbers on this line
std::cout << i*j << ' ' ;
std::cout << '\n' ; // a new line to get to the next line
}
}