Compile Error
/in/foo.cc:9:11: error: '::main' must return 'int' void main() ^
代码
#include <stdio.h>
int result(int x)
{
if(x>1)
return x*result(x-1);
return 1.0;
}
void main()
{
int n;
scanf("%d",&n);
printf("%d\n",result(n));
}