Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("Matrice.in");
- ofstream fout("Impar.out");
- int main() {
- int n, m;
- fin >> n >> m;
- int a[n][m];
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < m; j++) {
- fin >> a[i][j];
- }
- }
- for (int j = 0; j < m; j++) {
- int nr = 0;
- for (int i = 0; i < n; i++) {
- nr += a[i][j] % 2;
- }
- fout << nr << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement