CS21 Lab9: Sample Output

 
This program creates a database of information about cities
throughout the United States.  It allows you to enter two
cities (either by zip code or by city and state) and reports
the distance between them.
--------------------------------------------------------
CITY #1

Enter zip code OR city,state: bad input here
This is not valid input
Enter zip code OR city,state: 1234
Invalid zip code.
Enter zip code OR city,state: Yellowknife, NT
Yellowknife, NT not in database.
Enter zip code OR city,state: 11111
Invalid zip code.
Enter zip code OR city,state: Judith Gap, MT
 City, State, ZIP: Judith Gap, MT, 59453
           County: Wheatland
       Population: 307
       Lat / Long: 46.68 / -109.64
Next closest big city: Billings, MT (77.7 miles)

CITY #2

Enter zip code OR city,state: Pittsburgh
This is not valid input
Enter zip code OR city,state: 674733
Invalid zip code.
Enter zip code OR city,state: 67473
 City, State, ZIP: Osborne, KS, 67473
           County: Osborne
       Population: 1945
       Lat / Long: 39.41 / -98.71
Next closest big city: Wichita, KS (132.7 miles)

Distance between Judith Gap, MT and Osborne, KS = 745.2 miles

Check more locations (yes/no)? yes

CITY #1

Enter zip code OR city,state: Socorro, NM
 City, State, ZIP: Socorro, NM, 87801
           County: Socorro
       Population: 10145
       Lat / Long: 33.95 / -106.94
Next closest big city: Albuquerque, NM (75.8 miles)

CITY #2

Enter zip code OR city,state: 27705u
This is not valid input
Enter zip code OR city,state: Durham, NC
 City, State, ZIP: Durham, NC, 27701
           County: Durham
       Population: 216010
       Lat / Long: 36.00 / -78.90
Next closest big city: Raleigh, NC (12.4 miles)

Distance between Socorro, NM and Durham, NC = 1588.3 miles

Check more locations (yes/no)? no