| ||||||||||
| 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:为何我的代码过不了呢?In Reply To:为何我的代码过不了呢? Posted by:li5ch at 2013-11-23 21:04:13 > #include <iostream>
> #include <cstdio>
> using namespace std;
> int main()
> {
> int i=0,n,N;
> double x,y;
> cin>>n;
> for(int j=0;j<n;j++)
> {
> cin>>x>>y;
> i++;
> N=(x*x+y*y)*3.1416/50;
> N=(int)(N+0.5);
> printf("Property %d: This property will begin eroding in year %d.\n",i,N+1);
> }
> cout<<"END OF OUTPUT."<<endl;
> return 0;
> }
这是半圆,面积要除以2,而且结果也不应该是四舍五入
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator