#include<stdio.h>
main()
{
int data1,data2;
char op;
printf("Please enter an expression:");
scanf("%d%c%d",&data1,&op,&data2);
switch(op)
{
case '+':
printf("%d+%d=%d\n",data1,data2,data1+data2);
break;
case '-':
printf(<
编程实现简单的计算器功能
最新推荐文章于 2021-11-09 00:54:08 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)