wiktormadera

zad4

Apr 2nd, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int CZYPARZYSTA(int a)
  6. {
  7.     if(a%2==0)
  8.     {
  9.         return true;
  10.     }
  11.     {
  12.         return false;
  13.     }
  14. }
  15. int main()
  16. {
  17.     int liczba;
  18.  
  19.     cout << "Zwrocona 1(true) - parzysta, Zwrocone 0(false) - nieparzysta. Podaj liczbe calkowita:" << endl;
  20.     cin >> liczba;
  21.     cout << CZYPARZYSTA(liczba);
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment