Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool paran(int);
- bool pozitivan(int);
- int main()
- {
- int broj;
- cout << "Unesite cijeli broj: ";
- cin >> broj;
- if (paran(broj))
- cout << "Broj je paran i ";
- else
- cout << "Broj je neparan i ";
- if (pozitivan(broj))
- cout << " pozitivan!";
- else
- cout << " negativan!";
- system ("pause>0");
- return 0;
- }
- bool paran(int x)
- {
- if (x%2==0)
- return 1;
- return 0;
- }
- bool pozitivan(int y)
- {
- if (y>0)
- return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement