Block of Code

Practical Examples for Programmers

  • Home
  • C++
  • Java
  • Visual Basic
  • Discrete Math
  • Ask a Question

Baseball

The file ALE.txt contains the information shown in the first table below.  Write a program to use the file to produce a text file containing the information in the second table below in which the baseball teams are in descending order by the percentage of games won.

American League East games won and lost in 2012.

Team Won Los
 Baltimore 93 69
 Boston 69 93
 New York 95 67
 Tampa Bay 90 72
 Toronto 73 89

Final 2012 American League East standings.

Team Won Lost Percentage
New York 95 67 0.586
Boston 93 69 0.574
Tampa Bay 90 72 .0556
Toronto 73 89 0.451
Boston 69 93 0.426

The image below shows an example of what the program might look like:

Coming Soon

Secondary Sidebar

This is the secondary sidebar

Copyright © 2025 · Metro Pro Theme on Genesis Framework · WordPress · Log in