RafalSobala

zad 4, poprawione

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