程序改错,请问怎么改?#includeint main(void){char sign;int x,y;printf("输入x运算符y:");scanf("%d%c%d",&x,& sign,&y);if(sign='*')printf("%d*%d=%d\n",x,y,x*y);else if(sign='/')printf("%d/%d=%d\n",x,y,x/y);else if(sign='%')printf("%dMod%d=%d

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/30 23:02:26
程序改错,请问怎么改?#includeint main(void){char sign;int x,y;printf(
xON@Rk(mx7S M Q01܀1D? L-p:Xl`aLL|/O6 ty3wGŝ;mҧ®Ri:p3ge uD19K?RaÚdV{\u>/H`Paʆ) Lxϥi!P@;J-i1NIZ\A>(#Gy|FDXVB/( -4%uňa?rkɁ\odrhq8;40Jޢ:g'i[ҘQڝ]d~OI= gHZ}q'=w2פ5&?[o֫˻*Zv~<

程序改错,请问怎么改?#includeint main(void){char sign;int x,y;printf("输入x运算符y:");scanf("%d%c%d",&x,& sign,&y);if(sign='*')printf("%d*%d=%d\n",x,y,x*y);else if(sign='/')printf("%d/%d=%d\n",x,y,x/y);else if(sign='%')printf("%dMod%d=%d
程序改错,请问怎么改?
#include
int main(void)
{
char sign;
int x,y;
printf("输入x运算符y:");
scanf("%d%c%d",&x,& sign,&y);
if(sign='*')
printf("%d*%d=%d\n",x,y,x*y);
else if(sign='/')
printf("%d/%d=%d\n",x,y,x/y);
else if(sign='%')
printf("%dMod%d=%d\n",x,y,x%y);
else
printf("运算符输入错误!\n");
return 0;
}
哪里出错了?

程序改错,请问怎么改?#includeint main(void){char sign;int x,y;printf("输入x运算符y:");scanf("%d%c%d",&x,& sign,&y);if(sign='*')printf("%d*%d=%d\n",x,y,x*y);else if(sign='/')printf("%d/%d=%d\n",x,y,x/y);else if(sign='%')printf("%dMod%d=%d
判断语句是两个等号哟
#include
int main(void)
{
char sign;
int x,y;
printf("输入x运算符y:");
scanf("%d%c%d",&x,& sign,&y);
if(sign=='*')
printf("%d*%d=%d\n",x,y,x*y);
else if(sign=='/')
printf("%d/%d=%d\n",x,y,x/y);
else if(sign=='%')
printf("%dMod%d=%d\n",x,y,x%y);
else
printf("运算符输入错误!\n");
return 0;
}