Question
Write a program reads the city names and respective gas prices into 2 single-subscripted arrays in your program - one of type string, the other of type double. (We would call these "parallel arrays" - each corresponding location shows the city name and gas price for each city). Your program should do the following:
a. Find and display the average gas price.
b. Find and display the highest gas price, along with a list of all cities at that gas price.
c. Find and display the lowest gas price, along with a list of all cities at that gas price.
a. Find and display the average gas price.
b. Find and display the highest gas price, along with a list of all cities at that gas price.
c. Find and display the lowest gas price, along with a list of all cities at that gas price.
Answers
Related Questions
write a program that maintains two parallel arrays. after th arrays have been loaded the program sho...
Write a program that reads test scores up to 30 into an array. sentinel will stop when -1 is enter...
Create three arrays of type double. Do a compile-time initialization and place different values in t...