Question: JAVA, do 20.3 pls (Guessing the capitals) Rewrite Programming Exercise 8.37 to store the pairs of states and capitals so that the questions are displayed

JAVA, do 20.3 pls

JAVA, do 20.3 pls (Guessing the capitals) Rewrite Programming Exercise 8.37 to

(Guessing the capitals) Rewrite Programming Exercise 8.37 to store the pairs of states and capitals so that the questions are displayed randomly *20.3 8.37 ( Gue ss the capitals) Write a program that repeatedly prompts the user to enter apital for a state. Upon receiving the user input, the program reports whether a c the answer is correct. Assume that 50 states and their capitals are stored in a two-dimensional array, as shown in Figure 8.10. The program prompts the user to answer all states capitals and displays the total correct count. The user's answ is not case-sensitive. er Alabama Alaska Arizona Montgomery Juneau Phoenix FIGURE 8.10 A two-dimensional array stores states and their capitals. Here is a sample run: What is the capital of A1abama? Montogomery eter The correct answer should be Montgomery What is the capital of Alaska? Juneau Your answer is correct What is the capital of Arizona? The correct count is 35

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!