printf("%lf+%lf的计算结果是:%lf\n",a,b,result);break;case 2: /*减法计算*/
| a | 被除数 |int a = 10;| | b | 除数 |int b = 3;| | remainder | 取余运算的结果,即a除以b的余数 |int remainder = a % b;|
rewind(stdin);printf("请输入数字2:\n");scanf("%lf",&shu2); rewind(stdin);printf("请选择数字1与数字2进行的运算:(序号)\n""1.加法运算\n""2.减法运算\n""3.乘法运算\n""4.除法运算\n""5.取余运算\n");scanf("%d",&shu3); rewind(stdin);switch(shu3) {case(1):printf("运算结果...
include <iostream>using namespace std;int main(){char c;for(int a,b;cin>>a>>c>>b&&a!='Q';){switch(c){case'+':cout<<a<<"+"<<b<<"="<<a+b<<endl;break;case'-':cout<<a<<"-"<<b<<"="<<a-b<<endl;break;case'*':cout<<a<<"*"<<b<<"="<<a*b<<en...
double EPS=10E-6;double sum(double a,double b){ return a+b;} double sub(double a,double b){ return a-b;} double mul(double a,double b){ return a*b;} double divv(double a,double b){ return a/b;} int rem(int a ,int b){ return a%b;} int addnumber(int c,...