POJ1005

来源:互联网 发布:渔趣网有淘宝店吗 编辑:程序博客网 时间:2024/06/06 09:26

C++源代码:

//I Think I Need a Houseboat//2017.03.15by wyj#include#include#define pi 3.141592654using namespace std;int main(){int n,i;int z[100];float x, y;scanf_s("%d",&n);for (i = 1;i <= n;i++){scanf_s("%f%f", &x, &y);z[i] = pi*(x*x + y*y) / 100 + 1;}for (i = 1;i <= n;i++)printf("Property %d: This property will begin eroding in year %d.\n",i,z[i]);printf("END OF OUTPUT.");return 0;}

0 0
原创粉丝点击