#include<iostream>
using namespace std;
int main()
{int x,y,max;
cin>>x>>y;
if(x>y)x==max;
else y==max;
cout<<"max"<<max<<endl;
return 0;
}
程序,输入两个数,取大的输出,这样哪里错了?输出的数不对。
答案:2 悬赏:80 手机版
解决时间 2021-01-30 04:38
- 提问者网友:心牵心
- 2021-01-29 23:28
最佳答案
- 五星知识达人网友:duile
- 2021-01-29 23:50
int main()
{
int x,y,max;
cin>>x>>y;
max = x<y?y:x;
cout<<"max"<<max<<endl;
return 0;
}
{
int x,y,max;
cin>>x>>y;
max = x<y?y:x;
cout<<"max"<<max<<endl;
return 0;
}
全部回答
- 1楼网友:罪歌
- 2021-01-30 01:10
代码在哪? 追问: #include int main() {float a,b; scanf("%f%f",&a,&b); if(a>b) printf("%f%f",a,b); else printf("%f%f",b,a); return 0; } 回答: 你这是由大道小的顺序吧
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯