#include
#include
main()
{
while(1)
{
int a,b,c;
printf("请输入两个数,以逗号隔开\n");
scanf("%d,%d",&a,&b);
printf("选择算法\n") ;
printf(" 1.乘 2.除\n 3.加 4.减\n") ;
scanf("%d",&c);
switch(c)
{
case 1:c=a*b;printf("结果为%d\n",c);break;
case 2:if(b==0)
{ printf("除数不能为0\n");break;}
else
{c=a/b;
printf("结果为%d\n",c);break;}
case 3:c=a+b;printf("结果为%d\n",c);break;
case 4:c=a-b;printf("结果为%d\n",c);break;
}
}
}