Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int firstNumber, secondNumber, thirdNumber, negativeNumbers = 0;
- cin >> firstNumber >> secondNumber >> thirdNumber;
- if (firstNumber < 0) {
- negativeNumbers++;
- }
- if (secondNumber < 0) {
- negativeNumbers++;
- }
- if (thirdNumber < 0) {
- negativeNumbers++;
- }
- if (negativeNumbers % 2 == 0 || (firstNumber == 0 || secondNumber == 0 || thirdNumber == 0)) {
- cout << '+' << endl;
- }
- else {
- cout << '-' << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement