fork download
  1. #include <iostream> // matrix.cpp
  2. #include <fstream>
  3. using namespace std; int main()
  4. { setlocale (LC_ALL, "RUS");
  5. srand(time(NULL)); int i,j; int n=5;
  6. int a[n][n]; int y[n][n];
  7.  
  8. for (i=0; i<n; i++)
  9. { for (j=0; j<n; j++)
  10. { a[i][j]=(i+1)*(j+1);
  11. cout << a[i][j] << "\t";
  12. } cout << endl;
  13. } cout << endl;
  14. system("pause");}
Success #stdin #stdout #stderr 0.01s 5320KB
stdin
Standard input is empty
stdout
1	2	3	4	5	
2	4	6	8	10	
3	6	9	12	15	
4	8	12	16	20	
5	10	15	20	25	

stderr
sh: 1: pause: not found