Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main ()
- {
- int matrice[100][100],n,m,S=0;
- cin>>n>>m;
- for (int i=0; i<=n-1; i++)
- for (int j=0; j<=m-1; j++)
- {
- cin>>matrice[i][j];
- if (matrice[i][j]%2==0) S=S+matrice[i][j];
- }
- cout<<S;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment