Question: Write a program that prompts the user to enter cities and end when done write a loop that prints out the first letter for

Write a program that prompts the user to enter cities and end

 

Write a program that prompts the user to enter cities and end when done write a loop that prints out the first letter for each city. You must use a loop for this program SAMPLE RUN #1: java Firstlettercities Enter a city (end when done): Dallas Enter a city (end when done): San Joser Enter a city (end when done): Austin Enter a city (end when done): end- The first letter of each city is: D A SAMPLE RUN #2: java FirstLettercities Enter a city (end when done): Chicago Enter a city (end when done): Los Angeles- Enter a city (end when done): Atlanta Enter a city (end when done): Dallas- Enter a city (end when done): San Jose Enter a city (end when done): end- The first letter of each city is:

Step by Step Solution

3.51 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilScanner public class FirstLetterCities public static void mainString args Scanner ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!