foo.cc: In function 'int main()':
foo.cc:8:21: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
printf("%.1lf",p);
^
foo.cc:7:12: warning: 'a' is used uninitialized in this function [-Wuninitialized]
p = (a + b + c)/3;
~~^~~
foo.cc:7:12: warning: 'b' is used uninitialized in this function [-Wuninitialized]
foo.cc:7:16: warning: 'c' is used uninitialized in this function [-Wuninitialized]
p = (a + b + c)/3;
~~~~~~~^~~~
[Hydro](https://hydro.ac)提供评测服务