fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. const int ROWS = 5 , COLUMNS = 5;
  6.  
  7. std::cout << "Mul table\tb=0\tb=1\tb=2\tb=3\tb=4" << std::endl;
  8. for( int i = 0; i < ROWS; ++i )
  9. {
  10. std::cout << "\ta = " << i << '\t';
  11. for( int j = 0; j < COLUMNS; ++j )
  12. {
  13. std::cout << i * j << '\t';
  14. }
  15. std::cout << std::endl;
  16. }
  17. return( 0 );
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Mul table	b=0	b=1	b=2	b=3	b=4
	a = 0	0	0	0	0	0	
	a = 1	0	1	2	3	4	
	a = 2	0	2	4	6	8	
	a = 3	0	3	6	9	12	
	a = 4	0	4	8	12	16