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:为什么我这段代码用C++提交才可以,C就不行(错误原因说是标识符未声明)In Reply To:为什么我这段代码用C++提交才可以,C就不行(错误原因说是标识符未声明) Posted by:SummerJY at 2014-04-20 12:35:05 > #include<stdio.h> > const double PI=3.141592654; > int main() > { > > int n; > scanf("%d",&n); > int i=1; > for(i=1;i<=n;i++) > { > double x,y; > scanf("%lf%lf",&x,&y); > double Area; > Area=0.5*PI*(x*x+y*y); > int year; > year=(int)(Area/50.0+1.0); > printf("Property %d: This property will begin eroding in year %d.",i,year); > printf("\n"); > > } > printf("END OF OUTPUT."); > return 0; > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator