Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int l;
- int liczba;
- bool a=true;
- bool b=false;
- int CZY_PARZYSTA(int l){
- if(l%2==0){
- return a;
- }
- else{
- return b;
- }
- }
- int main()
- {
- cout << "Podaj liczbe"<<endl;
- cin >> liczba;
- cout <<CZY_PARZYSTA(liczba);
- return 0;
- }
- //Nie wiedziałem jak zrobić żeby funkcja boola zwracała true zamiast 1 dla prawdy i false dla fałszu zamiast 0. :(
Advertisement
Add Comment
Please, Sign In to add comment