简单题
View Code
#include#include using namespace std;const double pi = 3.14159265;int work(){ double x, y, l; cin >> x; cin >> y; l = x * x + y * y; return int(l * pi / 100) + 1;}int main(){ int n, t; //freopen("t.txt", "r", stdin); t = 0; cin >> n; while (n--) { t++; printf("Property %d: This property will begin eroding in year %d.\n", t, work()); } cout << "END OF OUTPUT." << endl; return 0;}