Josif_tepe

Untitled

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