第七组509寝室课后习题4.34

#include<stdio.h>
main()
{
int a,b,c,x;
printf("请输入a,b,c的值:");
scanf("%d,%d,%d",&a,&b,&c);
if(a==1)
x=b+c;
else if(a==2)
x=b-c;
else if(a==3)
x=b*c;
else if(a==4)
x=b/c;
printf("%d",x);
}

组员:刘健斌、陈福洲、欧阳思健

备注:if里面的判断语句中的关系运算符要输入正确!等于是“==”,不是“=”。

posted @ 2019-03-31 22:24  THESTRONGEST  阅读(192)  评论(1编辑  收藏  举报