# include & lt; Math. H>
Void main ()
{
Double s1, s2, c;
Char op;
Lf the scanf (" % % c % lf ", & amp; S1, & amp; Op, & amp; S2);
If (op=='+') {c=s1 + s2;
Printf (" % 2 lf ", c); }
The else
If (op=='-') {c=s1 and s2.
Printf (" % 2 lf ", c); }
The else
If (op=='*') {c * s2=s1;
Printf (" % 2 lf ", c); }
The else
If (op=='/')
{
If (fabs (s2) & lt; 1 e - 10)
Printf (" Wrong input!" );
The else {c=s1/s2; Printf (" % 2 lf ", c); }
}
The else
Printf (" Wrong input!" );
}
CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html