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