Math, asked by karerirachael, 2 months ago

Write a c++ program to determine whether two integers are both positive, both negative or both zeros

Answers

Answered by rkk1399
0

Step-by-step explanation:

#include <iostream>

using namespace std;

int main() {

int a, b;

cin >> a;

cin >> b;

if(a>0 && b>0){

cout << a << " and " << b << " are positive." << endl;

}

else if(a>0 && b<0){

cout << a << " is positive and " << b << " is negative." << endl;

}

else if(a<0 && b>0){

cout << a << " is negative and " << b << " is positive." << endl;

}

else if(a<0 && b<0){

cout << a << " and " << b << " are negative." << endl;

}

return 0;

}

Answered by llKookyQueenll
1

Answer:

\tt{Answer}

Hope it will help you.

Attachments:
Similar questions