看看这串代码的错误
#include <stdio.h>
int main()
{
int num;
int sum;
int a = 31;
int b = 32;
int c = 41;
scanf("%d%d\n",num,sum);
if(num = a)
{
if(sum = b)
{
printf("%d\n",c);
}
}
return 0;
}
为什么不能实现输入31,32时输出41
#include <stdio.h>
int main()
{
int num;
int sum;
int a = 31;
int b = 32;
int c = 41;
scanf("%d%d\n",num,sum);
if(num = a)
{
if(sum = b)
{
printf("%d\n",c);
}
}
return 0;
}
为什么不能实现输入31,32时输出41
2017-07-09
举报