Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Nieparzyste w macierzy.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- int d, n, m;
- int tab[500][500] = { 0 };
- cin >> d;
- for (int i = 0; i < d; i++)
- {
- cin >> n;
- cin >> m;
- for (int a = 1; a <= n; a++)
- {
- for (int b = 1; b <= m; b++)
- {
- cin >> tab[a][b];
- }
- }
- for (int a = 1; a <= n; a++)
- {
- for (int b = 1; b <= m; b++)
- {
- if (tab[a][b] % 2 != 0 && tab[a][b] != 0)
- {
- cout << tab[a][b] << " (" << b << "," << a << ")" << endl;
- }
- }
- }
- }
- //system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement