Lucian_Adrian

#767 SumaPare2

Jan 11th, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5. int matrice[100][100],n,m,S=0;
  6. cin>>n>>m;
  7. for (int i=0; i<=n-1; i++)
  8. for (int j=0; j<=m-1; j++)
  9. {
  10. cin>>matrice[i][j];
  11. if (matrice[i][j]%2==0) S=S+matrice[i][j];
  12. }
  13. cout<<S;
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment