Compile Error
/in/foo.c: In function 'main': /in/foo.c:5:19: error: invalid operands to binary & (have 'int *' and 'int') scanf("%d %d",&a &b); ~~ ^ /in/foo.c:6:1: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if(a>=0||b<=32767) ^~ /in/foo.c:8:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' printf("%d",sum); ^~~~~~
代码
#include<stdio.h>
int main()
{
int a,b,sum=0;
scanf("%d %d",&a &b);
if(a>=0||b<=32767)
sum=a+b;
printf("%d",sum);
return 0;
}