题解 | #简单运算#

简单运算

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

#include <cstdio>
#include <cmath>
using namespace std;

int main() {
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d ",a+b);
    printf("%d ",abs(a-b));
    printf("%d ",a*b);
    if(a>b) printf("%d ",a/b); else printf("%d ",b/a);
    if(a>b) printf("%d ",a%b); else printf("%d ",b%a);

    return 0;
}

全部评论

相关推荐

脾气小祖宗:这简历摸到都得狠狠地消毒液洗手😂
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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