sdut-1153 C语言实验——求两个整数之中较大者

来源:互联网 发布:php abstract 继承 编辑:程序博客网 时间:2024/06/16 12:50

点击打开链接

 Statistic Discuss

Problem Description

输入两个整数,请编程求其中的较大者。

Input

在一行中输入用空格隔开的两个整数,例如5 9。

Output

输出两个整数之中较大者,输出形式举例:max=9。

Example Input

5 9

Example Output

max=9
#include <iostream>using namespace std;int main(){int a,b;cin>>a>>b;if(a>=b)cout<<"max="<<a<<endl;elsecout<<"max="<<b<<endl;return 0;}/***************************************************User name: YT1658506207邵雪源Result: AcceptedTake time: 0msTake Memory: 208KBSubmit time: 2017-07-26 15:03:37****************************************************/



原创粉丝点击