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