Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

谁能帮忙看看1005题的程序错哪了?

Posted by Daisy1 at 2008-11-11 21:04:13
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator