fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int arr[3][3];
  7. for (int i = 0; i < 3; i++)
  8. {
  9. for (int j = 0; j < 3; j++)
  10. {
  11. arr[i][j] = j+1;
  12. std::cout << arr[i][j] << " ";
  13. }
  14. std::cout << std::endl;
  15. }
  16. return 0;
  17.  
  18. }
Success #stdin #stdout 0s 4180KB
stdin
Standard input is empty
stdout
1 2 3 
1 2 3 
1 2 3