Guest User

Untitled

a guest
May 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # include <iostream>
  2. # include <cstdio>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int a = 0;
  9.  
  10. while ((cout << "Podaj liczbe calkowita: ") && !(cin >> a)) {
  11. cout << "To nie jest liczba calkowita! \n";
  12. cin.clear();
  13. cin.ignore(numeric_limits < streamsize > ::max(), '\n');
  14. }
  15. if (a%2 == 0) {
  16. cout << "Liczba jest parzysta \n";
  17. }
  18. else {
  19. cout << "Liczba jest nieparzysta \n";
  20. getchar();
  21. system("pause");
  22. }
  23.  
  24. return 0;
  25. }
Add Comment
Please, Sign In to add comment