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