Question: 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
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.
China 1367960000
India 1262670000
United States 319111000
Indonesia 252164800
Brazil 203462000
Pakistan 188172000
Nigeria 178517000
Bangladesh 157339000
Russia 146149200
Japan 127090000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
