#include<stdio.h> int main(void) { int num1,num2,sum,difference,product,quotient,remainder; printf("Enter num1:"); scanf("%d",&num1); printf("Enter num2:"); scanf("%d",&num2); sum=num1+num2;/*计算两数的和*/ printf("sum=%d\n",sum); difference=num1-num2; printf("difference=%d\n",difference); product=num1*num2; printf("product=%d\n",product); quotient=num1/num2; printf("quotient=%d\n",quotient); remainder=num1%num2;/*计算数的余数*/
printf("remainder=%d\n",remainder); return 0; }