Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool isEqual(int x, int y)
- {
- return (x == y);
- }
- int main()
- {
- cout << "Enter a value:\t\t ";
- int x;
- cin >> x;
- cout << "Enter another value:\t ";
- int y;
- cin >> y;
- if (isEqual(x, y))
- cout << "Numbers were equal!" << endl;
- else
- cout << "Numbers were not equal" << endl;
- bool bZero(1);
- if (x == 0)
- bZero = 1;
- else
- if (y == 0)
- bZero = 1;
- else
- bZero = 0;
- if (bZero == 1)
- cout << "One of numbers was 0" << endl;
- else
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement