标签:space main iostream fine rod std 坐标 name for
刚开始的时候下意识想把坐标半径和每一年淹没的半径求出来做比较……
1 #include<iostream> 2 #define pi 3.14159265 3 using namespace std; 4 int main(){ 5 int N; 6 double x,y; 7 int year; 8 cin>>N; 9 for(int i=0;i<N;i++){ 10 cin>>x>>y; 11 year=pi*(x*x+y*y)/100+1; 12 cout<<"Property "<<i+1<<": This property will begin eroding in year "<<year<<"."<<endl; 13 } 14 cout<<"END OF OUTPUT."; 15 }
标签:space main iostream fine rod std 坐标 name for
原文地址:http://www.cnblogs.com/marlenemizuno/p/6349900.html