#include <stdio.h>
void main()
{
int a,b,c,d,x,y;
scanf("%d%d",&x,&y);
a=x+y;
b=x-y;
c=x*y;
d=x/y;
printf("he is %d,cha is %b,ji is %d,shang is %d\n",a,b,c,d);
}
你现在有很多符号都是中文的
代码改正后如下有帮助望采纳~
#include <stdio.h>
void main()
{
int a, b, c, d, x, y;
scanf("%d%d", &x, &y);
a = x + y;
b = x - y;
c = x * y;
d = x / y;
printf("he is %d,cha is %d,ji is %d,shang is %d\n", a, b, c, d);
}
你的代码全是中文的逗号,分号,括号,以及注意prinf输出格式化 是%d
用vs调试啊 直接编译器告诉你你的代码问题了
#include <stdio.h>
void main()
{
int a, b, c, d, x, y;
scanf_s("%d%d", & x, & y);
a = x + y;
b = x - y;
c = x * y;
d = x / y;
printf("he is %d,cha is %d,ji is %d,shang is %d\n", a, b, c, d);
}