Untitled

 avatar
unknown
c_cpp
3 years ago
734 B
4
Indexable
#include<bits/stdc++.h>
using namespace std;

int main() {
	int x, y;
	cout << "x = ";
	cin >> x;
	cout << "y = ";
	cin >> y;
	if (x == 0 && y == 0) {
		cout << x << " bang 0" << endl;
		cout << y << " bang 0" << endl;
		if ((x > 0 && y < 0) || (x < 0 && y>0)) {
			cout << x << " va " << y << " trai dau" << endl;
		}
		else {
			cout << x << " va " << y << " cung dau" << endl;
		}
	}
	else if (x != 0 && y != 0) {
		cout << x << " khac 0" << endl;
		cout << y << " khac 0" << endl;
	}
	else if (x == 0 && y != 0) {
		cout << x << " bang 0" << endl;
		cout << y << " khac 0" << endl;
	}
	else if (x != 0 && y == 0) {
		cout << x << " khac 0" << endl;
		cout << y << " bang 0" << endl;
	}
	return 0;
}
Editor is loading...