题解 | #简单运算#

简单运算

http://www.nowcoder.com/practice/23c9b22d40fa4d7698a1306fb0c9f975

#include <iostream>
using namespace std;

int main() {

    // write your code here......
    int a,b;
    cin>>a>>b;
  //先判断出大小值
    int max=a>b ? a:b;
    int min=a>b ? b:a;
    int x1=max+min;
    int x2=max-min;
    int x3=max*min;
    int x4=max/min;
    int x5=max%min;
    printf("%d %d %d %d %d",x1,x2,x3,x4,x5);

    return 0;
}
全部评论

相关推荐

每晚夜里独自颤抖:你cet6就cet6,cet4就cet4,你写个cet证书等是什么意思。专业技能快赶上项目行数,你做的这2个项目哪里能提现你有这么多技能呢
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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