#include <stdio.h> #include <stdlib.h> int main() { int a,b,c,d; a=10; b=5; d=a-b; c=a+b; printf("%d-%d=%d\n",a,b,d); 你这里填写的最后是C printf("%d+%d=%d\n",a,b,c); 这里最后是d 算出来的当然不一样 system("pause"); return 0; } |
#include <stdio.h> #include <stdlib.h> int main() {int a,b,c,d; a=10; b=5; d=a-b; c=a+b; printf("%d-%d=%d\n",a,b,d); printf("%d+%d=%d",a,b,c); system("pause"); return 0; |
改成这个: #include <stdio.h> #include <stdlib.h> int main() {int a,b,c,d; a=10; b=5; d=a-b; c=a+b; printf("%d-%d=%d\n",a,b,d); printf("%d+%d=%d",a,b,c); system("pause"); return 0; } |
好吧你赢了。。 |
这是在灌水么? |
稍微想一下就能知道c, d写反位置了吧…… |
printf("%d-%d=%d\n",a,b,c);c=a+b // printf("%d+%d=%d",a,b,d); d=a-b; |