Advertisement
Josif_tepe

Untitled

Apr 2nd, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n, m;
  8.     cin >> n >> m;
  9.     int matrica[3][3];
  10.     int proizvod = 1;
  11.     for (int i = 0; i < n; i += 1)
  12.     {
  13.         for (int j = 0; j < m; j += 1)
  14.         {
  15.             cin >> matrica[i][j];
  16.  
  17.         }
  18.     }
  19.     for (int i = 0; i < n; i += 1)
  20.     {
  21.         for (int j = 0; j < m; j += 1)
  22.         {
  23.             proizvod *= matrica[i][j];
  24.         }
  25.         cout << proizvod << endl;
  26.             proizvod = 1;
  27.     }
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement