Advertisement
Josif_tepe

Untitled

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