Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA, show output screenshot pls (Guessing the capitals) Rewrite Programming Exercise 8.37 to store the pairs of states and capitals so that the questions are
JAVA, show output screenshot pls
(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 35Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started