Question: Programming and Logic 1: Java In this program you'll need to store the populations of 12 countries. Define two arrays that will be used in

Programming and Logic 1: Java

In this program you'll need to store the populations of 12 countries.

Define two arrays that will be used in parallel to store the names of the countries and their populations.

Write a loop that uses these arrays to print each country's name and its population.

For an extra 7 points

Add a loop in your main method which asks the user running it if they would like to look up a given country's population. When they indicate No the program terminates.

Prompt user: What country would you like to look up?

Upon user entering something the program searches the country names array to see if it's there..

If it is output the country name searched for and it's corresponding population

If it is not output the country name searched for and that it was not found.

Programming and Logic 1: Java In this program you'll need to store

China India United States Indonesia Brazil Pakistan Nigeria Bangladesh Russia Japan 1367960000 12626700000 319111000 252164800 203462000 188172000 178517000 157339000 146149200 127090000

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!