fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. const int rows = 10;
  6. for (int row = 1; row <= rows; ++row)
  7. {
  8. for (int col = 1; col <= row; ++col)
  9. {
  10. int value = row * col;
  11. std::cout << value << ' ';
  12. }
  13. std::cout << '\n';
  14. }
  15. }
Success #stdin #stdout 0s 4532KB
stdin
Standard input is empty
stdout
1 
2 4 
3 6 9 
4 8 12 16 
5 10 15 20 25 
6 12 18 24 30 36 
7 14 21 28 35 42 49 
8 16 24 32 40 48 56 64 
9 18 27 36 45 54 63 72 81 
10 20 30 40 50 60 70 80 90 100