Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int liczba = 1, parzyste = -1, nieparzyste = 0;
- while(liczba != 0)
- {
- cin >> liczba;
- if(liczba % 2 == 0)
- ++parzyste;
- else
- ++nieparzyste;
- }
- cout << "parzyste: " << parzyste << endl;
- cout << "nieparzyste: " << nieparzyste << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment