题解 | #简单运算#
简单运算
https://www.nowcoder.com/practice/23c9b22d40fa4d7698a1306fb0c9f975
#include <iostream>
#include<stdio.h>
using namespace std;
int main() {
int a,b;
// write your code here......
scanf("%d %d",&a,&b);
int he,cha,ji,shan,mo;
he=a+b;ji=a*b;
if(a>b)
{cha=a-b;
shan=a/b;
mo=a%b;}
else
{cha=b-a;
shan=b/a;
mo=b%a;}
printf("%d %d %d %d %d",he,cha,ji,shan,mo);
return 0;
}
查看10道真题和解析