如题所述
第1个回答 2020-03-04
#include<stdio.h>
main()
{double a,b,w,x,y,z;
char ch;
scanf("%lf %c %lf",&a,&ch,&b);
if(ch=='*') {w=a*b;printf("%lf",w);}
if(ch=='//') {x=a/b;printf("%lf",x);}
if(ch=='+') {y=a+b;printf("%lf",y);}
if(ch=='-') {z=a-b;printf("%lf",z);}
}本回答被网友采纳
main()
{double a,b,w,x,y,z;
char ch;
scanf("%lf %c %lf",&a,&ch,&b);
if(ch=='*') {w=a*b;printf("%lf",w);}
if(ch=='//') {x=a/b;printf("%lf",x);}
if(ch=='+') {y=a+b;printf("%lf",y);}
if(ch=='-') {z=a-b;printf("%lf",z);}
}本回答被网友采纳