Sample run (user input is underlined)
name of data file: cities.txt
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 1
city: Boston
state abbreviation: MA
1790 3 18,300
1810 4 38,700
1830 3 85,600
1850 3 308,000
1870 3 501,000
1890 4 818,000
1910 4 1,213,000
1930 6 1,479,000
1950 6 2,301,000
1970 7 2,703,000
1990 9 3,355,000
2010 11 4,407,000
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 1
city: Kansas City
state abbreviation: MO
1890 19 165,000
1910 16 357,000
1930 16 561,000
1950 19 698,000
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 1
city: Louisville
state abbreviation: KY
1830 16 10,300
1850 13 61,000
1870 13 129,000
1890 18 183,000
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 2
year: 1790
1 44,100 Philadelphia, PA
2 33,100 New York, NY
3 18,300 Boston, MA
4 16,400 Charleston, SC
5 13,600 Salem, MA
6 13,500 Baltimore, MD
7 6,700 Newport, RI
8 6,400 Providence, RI
9 5,300 Gloucester, MA
10 4,800 Newburyport, MA
11 4,700 Portsmouth, NH
12 4,600 Nantucket, MA
13 4,500 Middleborough, MA
14 4,500 New Haven, CT
15 3,800 Richmond, VA
16 3,500 Albany, NY
17 3,000 Norfolk, VA
18 2,800 Petersburg, VA
19 2,800 Alexandria, VA
20 2,700 Hartford, CT
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 2
year: 2010
1 20,009,000 New York, NY
2 15,750,000 Los Angeles, CA
3 9,023,000 Chicago, IL
4 6,828,000 San Francisco, CA
5 6,003,000 Philadelphia, PA
6 5,685,000 Dallas, TX
7 5,513,000 Miami, FL
8 5,382,000 Houston, TX
9 4,743,000 Atlanta, GA
10 4,697,000 Washington, DC
11 4,407,000 Boston, MA
12 4,160,000 Detroit, MI
13 3,863,000 Phoenix, AZ
14 3,446,000 Seattle, WA
15 2,985,000 San Diego, CA
16 2,716,000 Denver, CO
17 2,651,000 Minneapolis, MN
18 2,497,000 Baltimore, MD
19 2,442,000 Tampa, FL
20 2,246,000 St. Louis, MO
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 1
city: Portland
state abbreviation: OR
no results found for Portland, OR
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 1
city: Portland
state abbreviation: ME
1810 15 7,200
1830 15 12,600
1850 20 36,000
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 2
year: 1800
no results found for 1800
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 2
year: 2017
no results found for 2017
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 4
invalid choice. try again!
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 0
invalid choice. try again!
(1) search by city
(2) search by year
(3) quit
Enter your choice (1-3): 3