代码怎么改
#include fun (int x)
{
int n,s1,s2,s3,t;
n=0;t=100;
while(t<=999){
s1=t%10;s2=s1%10;s3=t/100;
if(s1+s2+s3==x)
{
printf("%d",t);
n++;
}
t++;
}
return n;
}
main()
{ int x=-1;
while(x<0)
{
printf("Plrase input(x>0:");
scanf("%d",&x);
}
printf("\The result is:%D\n",fun(x));
}
[Error] D:\360data\重要数据\我的文档\C-Free\Temp\未命名2.cpp:3: error: ISO C++ forbids declaration of `fun' with no type
怎么