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