题解 | #最大最小值#

最大最小值

https://ac.nowcoder.com/acm/problem/22015

#include using namespace std;

int main()

{

int a=0,b=0,c=0,max=0,min=0;
cin>>a>>b>>c;
max=(a>b)?a:b;
max=(max>c)?max:c;
min=(a<b)?a:b;
min=(min<c)?min:c;
cout<<"The maximum number is : "<<max<<endl;
cout<<"The minimum number is : "<<min<<endl;

}

全部评论
太牛了
点赞 回复 分享
发布于 12-23 22:59 重庆

相关推荐

评论
13
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务