zoukankan      html  css  js  c++  java
  • POJ 1005: I Think I Need a Houseboat

    #include <iostream>
    #include <cmath>
    using namespace std;    
    const double PI=3.141592654;
    int alu(double x, double y) {  
        double R2=x*x+y*y;  
        double S=PI*R2*0.5;  
        return (int)ceil(S/50.0);
    }
    int main() {  
        int N;
        cin>>N;  
        for(int i=1;i<=N;++i){
            double x,y;  
            cin>>x>>y;  
            int cnt=alu(x,y);  
            cout<<"Property "<<i<<": This property will begin eroding in year "<<cnt<<'.'<< endl;   
        }
        cout<<"END OF OUTPUT."<<endl;    
        return 0;  
    }  
    View Code
  • 相关阅读:
    项目不能imports同名命名空间
    表格分页
    关于Web Post信息的编码
    JJHIS构想
    asp.net客户端传参的小结
    注销类业务的处理
    枚举类型的一些用法总结
    MO功能使能情况
    在内嵌页面得到某个内嵌页面所在的frame
    不同包里的全局变量定义方式及系统配置处理
  • 原文地址:https://www.cnblogs.com/Rhythm-/p/9336822.html
Copyright © 2011-2022 走看看