比较大小:
#include<iostream>
using namespace std;
int main() {
int x, y;
cout << "enter x and y:\n";
cin >> x >> y;
if (x != y)
if (x > y)
cout << x << "X Bigger!"<<endl;
else
cout << "Y Bigger!"<< endl;
else
cout << "They are equal!"<< endl;
return 0;
}
运行结果: