foo.c: In function 'main':
foo.c:7:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(int i=a;i<=b;i++)
^~~
foo.c:9:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
printf("%d",sum);
^~~~~~
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&a,&b);
^~~~~~~~~~~~~~~~~~~
foo.c:8:6: warning: 'sum' may be used uninitialized in this function [-Wmaybe-uninitialized]
sum+=i;
~~~^~~
[Hydro](https://hydro.ac)提供评测服务