Dushan Silva
asked on
URGENT: find smallest difference (either PHP, Java or Python)
Hi Experts,
Could you please help me to resolve following problem.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
The file football.txt contains the results from the English Premier League for 2001/2. The columns labeled ‘F’ and ‘A’ contain the total number of goals scored for and against each team in that season (so Arsenal scored 79 goals against opponents, and had 36 goals scored against them). Need a java program to print the name of the team with the smallest difference in ‘for’ and ‘against’ goals.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------
football.txt
Could you please help me to resolve following problem.
--------------------------
The file football.txt contains the results from the English Premier League for 2001/2. The columns labeled ‘F’ and ‘A’ contain the total number of goals scored for and against each team in that season (so Arsenal scored 79 goals against opponents, and had 36 goals scored against them). Need a java program to print the name of the team with the smallest difference in ‘for’ and ‘against’ goals.
--------------------------
football.txt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot Garry-G, lwadwell and Ray for your great example codes.
Hi Ray,
I'm getting following for the given code.
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----
Notice: Undefined offset: 1 in C:\AppServ\www\dush\2.php on line 55
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----
Hi Ray,
I'm getting following for the given code.
--------------------------
Notice: Undefined offset: 1 in C:\AppServ\www\dush\2.php on line 55
--------------------------
Maybe you are not using the test data set that was posted here? Please see line 44 for the URL of the file I relied on when writing the code.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot all!!
ASKER
Thanks a lot Experts.