foo.c: In function 'main':
foo.c:7:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
int i,sum1.sum2,sum3,sum;
^
foo.c:11:3: error: 'sum1' undeclared (first use in this function)
sum1++;}
^~~~
foo.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
foo.c:15:2: error: 'sum2' undeclared (first use in this function); did you mean 'sum1'?
sum2++;}
^~~~
sum1
foo.c:20:2: error: 'sum3' undeclared (first use in this function); did you mean 'sum2'?
sum3++;}
^~~~
sum2
foo.c:24:9: error: expected statement before ')' token
{b*=10;)
^
foo.c:27:3: error: 'sum' undeclared (first use in this function); did you mean 'sum3'?
sum=a+b+c;
^~~
sum3
foo.c:30:1: error: expected declaration or statement at end of input
}
^
foo.c:6:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&a,&b,&c);
^~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务