Kacper_Michalak

Zadanie funkcje 3

Jan 23rd, 2021
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. bool CZY_PARZYSTA(int x)
  6. {
  7.     if (x % 2 == 0)
  8.     {
  9.         return true;
  10.     }
  11.     else
  12.     {
  13.         return false;
  14.     }
  15. }
  16.  
  17. int main()
  18. {
  19.     cout << CZY_PARZYSTA(-5)<<endl;
  20.     cout << CZY_PARZYSTA(10)<<endl;
  21.     cout << CZY_PARZYSTA(-99)<<endl;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment