| ||||||||||
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 |
谁能帮忙看看1005题的程序错哪了?In Reply To:谁能帮忙看看1005题的程序错哪了? Posted by:19851119 at 2004-11-15 19:13:45 #include <iostream> #include <math.h> using std::cout ; using std::cin ; int main(){ int size ; float a[100][2] ; int y = 1 ; double pi = 3.1415926535897932 ; cin >> size ; for (int i=0 ;i<size;i++) { for (int j= 0 ;j<2;j++) { cin >> a[i][j] ; } } for (int m = 0; m < size ;m++) { y += ((a[m][0]*a[m][0]+a[m][1]*a[m][1])*pi)/(50*2) ; cout << "Property " << m+1 << ": This property will begin eroding in year " <<y<<".\n"; } cout <<"END OF OUTPUT"<<"\n" ; return 0 ; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator