#include <iostream>
using namespace std;
int main(){
int a, b;
cout << "Enter the value of a" << endl ;
cin >> a;
cout << "Enter the value of b" << endl;
cin >> b;
// applying conditions
if ((a != 0 and b==0) or (a == 0 and b !=0)){
cout << "Exactly one of x or y is zero" << endl;
}
else{
cout << "Neither or both of x and y are zero" << endl;
}
}
Comments
Leave a comment