Josif_tepe

Untitled

Feb 10th, 2026
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int mat[3][3];
  6.     mat[0][0] = 1;
  7.     mat[0][1] = 2;
  8.     mat[0][2] = 3;
  9.     mat[1][0] = 4;
  10.     mat[1][1] = 5;
  11.     mat[1][2] = 6;
  12.     mat[2][0] = 7;
  13.     mat[2][1] = 8;
  14.     mat[2][2] = 9;
  15.    
  16.     for(int i = 0; i < 3; i++) {
  17.         for(int j = 0; j < 3; j++) {
  18.             cout << mat[i][j] << " ";
  19.         }
  20.         cout << endl;
  21.     }
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment