今天写了个程序发现了个问题,请求解答:
#include<stdio.h>
int main()
{
int num1 = 0;
int num2 = 0;
int num3 =num1 + num2;
printf("num1=");
scanf("%d",&num1);
printf("num2=");
scanf("%d",&num2);
printf("num3=%d\n",num3);
return 0;
}
为什么我的编译 执行的答案是:
num1=10
num2=20
num3=0
Program ended with exit code: 0
num3怎么不是求和的30???????? |
|