#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main()
{
int a,c;
char b;
while(scanf("%d",&a)!=EOF)
{ scanf("%c",&b);
while(b==' ')
{
scanf("%c",&b);
}
scanf("%d",&c);
if(b=='+')
{
printf("%d",a+c);
}
else if(b=='-')
{
printf("%d",a-c);
}
else if(b=='*')
{
printf("%d",a*c);
}
else if(b=='/')
{
printf("%lf",a*1.0/c);
}
}
return 0;
}
计算器
最新推荐文章于 2021-10-02 17:30:34 发布