Advertisement
Guest User

asdfghj

a guest
Jan 23rd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<cstdlib>
  2. #include<iostream>
  3. using namespace std;
  4.  
  5.  
  6. int isEven(int zahl)
  7.  
  8. {
  9. cin>>zahl;
  10.  
  11. if(zahl %2==1)
  12. {
  13.  
  14. return 0;
  15. cout<<"Zahl ist ungerade\n";
  16. }
  17.  
  18. if(zahl %2==0)
  19. {
  20.  
  21. return 1;
  22. cout<<"Zahl ist gerade\n";
  23. }
  24.  
  25. }
  26.  
  27. int main()
  28.  
  29. {
  30. int zahl;
  31. cout<<isEven(zahl);
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement