1005 i think i need a houseboat

在测评系统好几次没有输出成功的原因是printf()中少了空格。

#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;
}

猜你喜欢

转载自www.cnblogs.com/sweet-ginger-candy/p/11504115.html
今日推荐