Josif_tepe

Untitled

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