下面哪里錯了
這樣為什么不行呀
#include
int main()
{
? ?int x,y,a,b,c,d,e;
?? x = 10;
?
? y = -3;
?
?printf("x+y=%d\n",a);?
? printf("x-y=%d\n",b);
?
?printf("x*y=%d\n",c);?
?printf("x/y=%d\n",d);
??
?printf("x%y=%d\n",e); ??
?return 0; ? ? }
這樣為什么不行呀
2016-11-12
#include后面缺少了頭文件?<stdio.h>并且輸出時調(diào)用的變量名沒有通過計算也沒有賦值默認為0
2016-05-14
#include <stdio.h>
int main()
{
? ? int x,y,a,b,c,d,e;
? ? x = 10;
? ? y = -3;
? ? a=x+y;
? ? b=x-y;
? ? c=x*y;
? ? d=x/y;
? ? e=x%y;
? ? printf("x+y=%d\n", a ? ?); ?
? ? printf("x-y=%d\n", ? b ?);
? ? printf("x*y=%d\n", ?c ? );
? ? printf("x/y=%d\n", ?d ? );
? ? printf("x%y=%d\n", ? e ?); ?
? ? return 0; ? ?
}
2016-05-01
頭文件沒有完整
#include<stdio.h>
而且輸出表達式有問題。a,b,c,d,e,都沒有賦值;你可以這樣改
#include<stdio.h>
int main()?
{ ? ?int x,y;?
? ?x = 10; ??
? y = -3; ??
?printf("x+y=%d\n",x+y); ?
? printf("x-y=%d\n",x-y); ??
?printf("x*y=%d\n",x*y); ?
?printf("x/y=%d\n",x/y); ? ?
?printf("x%y=%d\n",x%y); ? ?
?return 0; ? ? }
2016-05-01
頭文件沒有完整
#include<stdio.h>