Assignment 8 : Sports Teams List

Create an application that will allow a user to type in their favorite Baseball, Football, and Basketball teams in any order but will output those names in three lists based upon the sport with each list in alphabetic order.

If a person inputs the following information (uses more than one prompt):   Football, Giants;  Baseball Yankees;  Football, Patriots; Basketball, Knicks; Baseball, Twins; Basketball, Spurs; Football, Ravens; Baseball, Marlins; Basketball, Bulls

Baseball:
1.  Marlins
2.  Twins
3. Yankees

Basketball:
1.  Bulls
2.  Knicks
3.  Spurs

Football:
1. Giants
2. Patriots
3.  Ravens

The user can put in as many names as they want so you’ll need a while loop for that, you need to sort the team names so you’ll need an array for that, and you must output the resulting sorted names using a for loop.

For this assignment only a flowchart and Code file is needed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.