Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<cstdlib>
- #include<iostream>
- using namespace std;
- int isEven(int zahl)
- {
- cin>>zahl;
- if(zahl %2==1)
- {
- return 0;
- cout<<"Zahl ist ungerade\n";
- }
- if(zahl %2==0)
- {
- return 1;
- cout<<"Zahl ist gerade\n";
- }
- }
- int main()
- {
- int zahl;
- cout<<isEven(zahl);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement