如题,是老师给的作业,但写出来总有错。帮忙看看
#include
using namespace std;
// 请在此编写compare()函数
//~
void PrintLine(const char* s) {
cout<< s << endl;
}
void main() {
int x, y;
PrintLine("Input X:");
cin>>x;
PrintLine("Input Y:");
cin>>y;
int result = 0;
//result = compare(x, y);
if (result == 0) {
PrintLine("X is equal to Y.");
} else if (result < 0) {
PrintLine("X is less than Y.");
} else {
PrintLine("X is greater than Y.");
}
}