所以我尝试运行代码,并更改了一些可能的修复程序,但仍然出现错误
int abc(int bil)
{
if (bil==1)
return 1;
else
return bil*abc(bil-1);
}
int hasil = abc(5);
printf("%d", hasil);
它告诉我一些错误:
main.c:19:13: error: initializer element is not constant
int hasil = abc(5);
^~~
main.c:20:8: error: expected declaration specifiers or ‘...’ before string constant
printf("%d", hasil);
^~~~
main.c:20:14: error: expected declaration specifiers or ‘...’ before ‘hasil’
printf("%d", hasil);
^~~~~