| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:为什么是cpp(18) : fatal error C1004: unexpected end of file found?In Reply To:为什么是cpp(18) : fatal error C1004: unexpected end of file found? Posted by:ye at 2004-12-15 00:29:15 > #include<stdio.h>
> #include<math.h>
> void main()
> {
> int n,i,m,c,sum;
> scanf("%d",&n);
> while(n!=0){
> i=1;
> sum=0;
> if(n>(i+1)*i/2)c=i++;
> else{
> for(i=0;i<c;i++)sum=sum+i*i;
> m=sum+(n-(c-1)*c/2)*c;
> printf("%d %d",n,m);
> scanf("%d",&n);
> }
> }少了一个括号:)
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator