Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
C++参考#include <iostream> #include <stdlib.h> using namespace std; int main(void) { int n = 0; double x=0, y=0; int years; cin >> n; for (int i = 0; i < n; i++){ cin >>x>>y; years = int(3.14*(x*x + y*y)/(2*50)); printf("Property %d: This property will begin eroding in year %d.\n", i + 1, years+1); } cout << "END OF OUTPUT." << endl; system("pause"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator