Advertisement
Michal_Pilarski

zad4

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