A377.比较大小题解:
2026-02-10 12:50:46
发布于:四川
59阅读
0回复
0点赞
A377.比较大小
#include<iostream>
using namespace std;
int main(){
int x,y;
cin >> x >> y;//输入
if(x==y){//判断=
cout << "=";
}else if(x>y){//判断>
cout << ">";
}else if(x<y){//判断<
cout << "<";
}
return 0;
}
全部评论 2
不用说了吧,这么简单的水题,直接上代码:
#include<iostream>
using namespace std;
int main(){
int x,g;
cin>>x>>g;
if(x > g)
{
cout<<">"<<endl;
}
if(x == g)
{
cout<<"="<<endl;
}
if(x < g)
{
cout<<"<"<<endl;
}
return 0;
}2026-08-29 来自 福建
0完美!
2026-02-10 来自 四川
0







有帮助,赞一个