新人求解释
程序是这样的:
#include<iostream>
using namespace std;
int main()
{
int a,n,t,s,s1;
cin>>a>>n;
s1=a;s=a;
for(t=1;t<n;t++)
{a=a*10+s1;
s=s+a;}
printf("a+aa+aaa+...=%d\n",s);
return 0
}
然后调试的时候总是这样e:\c++课后作业\201\ch0603.cpp(14) : fatal error C1010: unexpected end of file while looking for precompiled header directive
执行 cl.exe 时出错.
这是怎么回事啊???
[解决办法]
return 0;//少了个逗号
[解决办法]
return 0;//加分号结尾。
[解决办法]