1005 i think i need a houseboat

The reason the system several times in the evaluation of success is not output printf () in less space.

#include<iostream>
#include<cstdio>
#include<cmath>
const double pi=3.1415926;
using namespace std;
int main(){
    double x,y;
    int T;
    int t,h=1;
    cin>>T;
    while(h<=T){
        t=1;
        cin>>x>>y;
        double s=pi*(x*x+y*y)/2;
        t+=(int)(s/50);
        printf("Property %d:",h);
        printf(" This property will begin eroding in year %d.\n",t);
        h++;
    }
    cout<<"END OF OUTPUT."<<endl;
    return 0;
}

 

Guess you like

Origin www.cnblogs.com/sweet-ginger-candy/p/11504115.html