Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <iostream>
- # include <cstdio>
- using namespace std;
- int main()
- {
- int a = 0;
- while ((cout << "Podaj liczbe calkowita: ") && !(cin >> a)) {
- cout << "To nie jest liczba calkowita! \n";
- cin.clear();
- cin.ignore(numeric_limits < streamsize > ::max(), '\n');
- }
- if (a%2 == 0) {
- cout << "Liczba jest parzysta \n";
- }
- else {
- cout << "Liczba jest nieparzysta \n";
- getchar();
- system("pause");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment