Advertisement
Josif_tepe

Untitled

Apr 19th, 2024
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 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.     cout << mat[0][0] << " " << mat[0][1] << " " <<  mat[0][2] << endl;
  17.     cout << mat[1][0] << " " << mat[1][1] << " " << mat[1][2] << endl;
  18.     cout << mat[2][0] << " " << mat[2][1] << " " << mat[2][2] << endl;
  19.    
  20.    
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement