foo.cc: In function 'int stair(int, int)':
foo.cc:6:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
if (n == 2)
^
foo.cc:11:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
if (n == 3)
^
foo.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
foo.cc: In function 'int main()':
foo.cc:26:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务