Advertisement
sheredega

Task #2

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