Sarah is developing a program to search and analyze an existing list of city names.
Open Q05 in the code editor.
It contains an array/list of city names named cities.
Sarah wants the program to:
99 to exit. No validation of this input is required.99 to exit the program.Write the code for the program.
Your program must function correctly even if the size or contents of the cities array is changed.
Save your code as Q05FINISHED with the correct file extension for your programming language.
An example of the expected program output is shown below:
Enter a search term or 99 to exit: Bos
Bristol
Boston
Belfast
Bostonia
4 city/cities begin with B
Boston
Bostonia
2 city/cities contain Bos
The longest city name has 8 characters
The shortest city name has 6 characters
The longest city name is Bostonia
The shortest city name is Boston
Enter a search term or 99 to exit: