Advertisement
MarcinKrol

Zad 4 - poprawa

Mar 29th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. //Zad4 - poprawa
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int liczba;
  9. int czy_parzysta (int i)
  10. {
  11. if (i%2==0)
  12. {
  13. return true;
  14. }
  15. else
  16. {
  17. return false;
  18. }
  19. }
  20.  
  21.  
  22. int main()
  23. {
  24.  
  25. cout << "Podaj liczbe calkowita: ";
  26. cin >> liczba;
  27. cout << endl;
  28. cout << czy_parzysta(liczba);
  29. cout << endl;
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement