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