Hdoj1065 simple questions

From , 5 Years ago, written in C++, viewed 90 times.
URL https://pastebin.vip/view/f31b2046
  1. #include<iostream>
  2. #include<math.h>
  3. #define PI 3.1415926//oj上的数据不太好,只有PI = 3.1415926时才能过。
  4. using namespace std;
  5.  
  6. int main(){
  7.         int m;
  8.         double x, y;
  9.         cin>>m;
  10.         for(int i = 0; i < m; i++){
  11.                 cin>>x>>y;
  12.                 double s = PI * (x * x + y * y);
  13.                 int count = s / 100 + 1;
  14.                 cout<<"Property "<<i + 1<<
  15.                         ": This property will begin eroding in year "<<count<<"."<<endl;
  16.         }
  17.         cout<<"END OF OUTPUT."<<endl;
  18. }

Reply to "Hdoj1065 simple questions"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website