Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- ifstream we;
- ofstream wy;
- int a, x, wynik1, wynik2;
- int main()
- {
- we.open("przyklad.txt");
- wy.open("wyniki 6.1.txt");
- for ( int i = 0; i < 1000; i++ )
- {
- we >> a;
- a/=10;
- x%=a;
- if ( x % 2 == 0 )
- wynik1++;
- else wynik2++;
- }
- cout << wynik1 << " " << wynik2;
- we.close();
- wy.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement