I need some help arranging these countries in a C++ program : China: 1,433,783,686 India: 1,366,417,754 United States: 329,064,917 Indonesia: 270,625,568 Pakistan: 216,565,318 Brazil: 211,049,527 Nigeria: 200,963,599 Bangladesh: 163,046,161 Russia: 145,872,256 Mexico: 127,575,529 Japan: 126,860,301 Ethiopia: 112,078,730 Philippines: 108,116,615 Egypt: 100,388,073   As part of a larger program, you need to write code that will store and display the names and population values for 14 countries. Compose the code necessary to define two arrays that will be used in parallel to store the country names and their populations. Assume that a different part of the larger program is responsible for loading values into the parallel arrays you created. Write code that will display each of the country’s names and their corresponding population values.

Question

I need some help arranging these countries in a C++ program :

China: 1,433,783,686

India: 1,366,417,754

United States: 329,064,917

Indonesia: 270,625,568

Pakistan: 216,565,318

Brazil: 211,049,527

Nigeria: 200,963,599

Bangladesh: 163,046,161

Russia: 145,872,256

Mexico: 127,575,529

Japan: 126,860,301

Ethiopia: 112,078,730

Philippines: 108,116,615

Egypt: 100,388,073

 

As part of a larger program, you need to write code that will store and display the names and population values for 14 countries. Compose the code necessary to define two arrays that will be used in parallel to store the country names and their populations. Assume that a different part of the larger program is responsible for loading values into the parallel arrays you created. Write code that will display each of the country’s names and their corresponding population values.

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: I am having issues with C++ because this code does not work: int main() {int userNum; userNum = 5;co...

A: Explanation:A proper C++ program should include header file “<iostream>”, begins with “#” sign...

Q: The print is very small. I apologize in advance for this.  With this homework that has already been ...

A: High Level DesignFrom the limited information that has been provided here, here are the suggestions:...

Q: Describe a hypothetical work environment that would be best for CISC and which for RISC. Explain why...

A: Reduced Instruction Set Computer (RISC) is a kind of the processor, or Instruction Set Architecture ...

Q: Using the results of the dependency diagram (attached), table of removal and partial dependency and ...

A: Entities Identified : Student , Advisor , Appointment and Department.Entity Student is having STUDEN...

Q: In a file called CountMultiples.java, write a program that: Asks the user to enter an integer M. It...

A: Program code #1:

Q: the question i am having trouble with is: you are designing an application at work that transmits da...

A: Design the application at work and it must transmit data records to another building within the same...

Q: Using the initial dependency diagram (attached), remove all partial dependencies, draw the new depen...

A: According to the given dependency diagram, there is no partial dependency but there are transitive d...

Q: Why is it important for you to know about compressed zip files and folders

A: Compressed ZIP files and foldersCompressed ZIP files are the files that pack one or more computer fi...

Q: Using the table structures you created (in first attachment called "Table Stucture", remove all tran...

A: Click to see the answer

Q: How become a ggod programmer?

A: Good programmer:Becoming programmer is not a big thing; it is all about learning the logics of the p...

Q: I dont understand how theyre getting the answers to the output public class MysteryWho {public stati...

A: The output of the given program is:

Q: Please put into SOP form~xyz + yz + x~y

A: It is said that a Boolean expression consisting solely of Minterms (product terms) is in the form of...

Q: Think about your own university or college and choose an idea that could improve student satisfactio...

A: I passed from state university named ‘WBTU’.The university provide online facilities for students to...

Q: What are the implications of crypto currency to the international banking system?

A: A cryptocurrency is a kind of digital asset which is designed  to work as medium of exchange that us...

Q: To keep track of students and their advisors, a university uses the table structure shown below. Ass...

A: Functional DependenciesThe set of functional dependencies based on the data is:Student _ID àStudent_...

Q: When using the arc implementation to convert a super set entity into a relation, what if the entityd...

A: Arc implementation is considered as supertypes/subtypes data modelling. Like for an Event, it can be...

Q: Is BIOS volatile?

A: Volatile memory is the computer memory that maintains its data only when the computer is in power. A...

Q: What are the different companies providing NOS- Network Operating System?

A: A network operating system is basically an operating system which is developed to support PCs, works...

Q: Euler's method is a numerical method for generating a table of values (xi, yi) that approximatethe s...

A: Here we use following Variables, Functions, Data types and Header files to estimate the value of y w...

Q: 1

A: Different business rules are given in the question which form the entities like Volunteer, Area, Loc...

Q: In C++ Create two functions called TheNumber. One version of TheNumber should accept a string and ou...

A: Program code in C++ for creating two functions called TheNumber. One version of the TheNumber functi...

Q: PLEASE EXPLAIN ALL STEPS: This question has been answered multiple times, clearly by the same tutor,...

A: 1)xz + (xy + ~z)As there are three variables in the above Boolean expression there will be 23 = 8 ca...

Q: Which filenames would be a subsequent ls command display?$ lsabc abd abe abf abg abh$ rm abc ab*rm: ...

A: To describe which filenames the subsequent ls command display.

Q: Explain the following error message. $ lsabc abd abe abf abg abh$ rm abc ab*rm: cannot remove ‘abc’ ...

A: “rm” command: This command is used to removes each specified file on the command line.For example, i...

Q: In C++. Data canvas is a file with bunch of random words.        Data canvas: aahs aals abas abba ab...

A: Program Instructions:Use the open() function of fstream to open the file.Use do-while and while loop...

Q: USING THE CYK ALGORITHM, prove that the String w= abbbaa is in the language / the member of the give...

A: Given a context-free grammar: G and a string w– G = (V, ∑, P, S)where » V  is finite set of variable...

Q: Is a honeypot entrapment or is it a way of observing the details of illegal computer activities?

A: Honeypot:A honeypot is a computer security mechanism set up as a decoy for luring malicious attacker...

Q: c++ Write a program to swap the contents of two arrays. Each array has five elements. The fist array...

A: Program Instructions:Declare and initialize array and variables.Print the elements of arrays before ...

Q: in python 2. Now write a program named filereader.py that reads and displays the data in friends.txt...

A: The following python program is created that reads and displays data in a file named as friends.txt ...

Q: write a program in c++. You work for a box company, and have been asked to write a program to compar...

A: Solution:The C++ program has the following algorithm:Declare and initialize the required variables.D...

Q: Create a new file in C++ and save it as lab12_XYZ.cpp  Consider rolling two six-sided dice. Whil...

A: Program Instructions:Declare the header files, constants, and prototypes.In main() call functions di...

Q: Question: Write a program that prompts the user to enter the number of students and each student's s...

A: Solution:The python program has the following algorithm:Prompt and read the total number of students...

Q: m2 separated by a distance d is given by:F = Gm1m2d 2where G is the universal gravitational constant...

A: A C++  program to display the gravitational force between two objects is given below;Program code://...

Q: Using Java Eclipse IDE  (Average an array) Write two overloaded methods that return the average o...

A: Program Instructions:Take 10 double values using scanner class in an array.Call the method average w...

Q: In a large organization, how do you typically request permission to perform a network change?

A: Make the necessary management decisions regarding the changes.

Q: In Lab 2, you created a menu for a simple calculator program. In this lab, you will add some functio...

A: A C++ program for the given scenario is provided below;Program://Declare necessary header files#incl...

Q: Write a Java class, XXX_Lab7-3, where XXX is your Kean email ID. In the main method:* Create an arra...

A: Writing a java Program to create a class name XXX_Lab7-3. In this program there are two arrays, one ...

Q: Write a grammar for the language consisting of strings built only of theletters aand b. The strings ...

A: The given language L contains the strings that have infinite number of letters but the strings must ...

Q: in python 3.2 Selling a new vehicle pays a salesperson $1500. Selling a used vehicle pays a commissi...

A: Import local function to use currency formatting in the program.prompt user to enter the type of veh...

Q: I have a bit of code that is intended to read a file ("students.txt") and calculate the average, hig...

A: Description:The following program is to print the highest, lowest, and average of test scores by rea...

Q: Hello,  Just want to check if the attached Crow's Foot ERD is correct for the following problem: Gi...

A: The given crow feet representation is not the correct way to draw crow feet ERD. There is only one b...

Q: I am looking for help with how to read and understand where to start with this assignment.

A: High Level DesignFrom the limited information that has been provided here, here are the suggestions:...

Q: Write a program in Python for a (very) rudimentary shooter "game". You are the only shooter and you ...

A: NOTE: Sample output is missing in the question. The following program is executed for own sample out...

Q: Twin primes are two primes that differ by 2 (e.g., 3 and 5, 101 and 103). Write a c++ program that o...

A: Twin primes are two primes that differ by 2 (e.g., 3 and 5, 101 and 103).Comment are the not readabl...

Q: Please help me solve this problem

A: Note: The Python program is coded as the user requirements.In Python, code indentation is very impor...

Q: Using the following truth table, write the equivalent Boolean equations in Sum of Product and Produc...

A: Simplification of Sum Of Products (SOP):The truth table of the SOP is as follows

Q: Annotate the following MIPS instructions to indicate source registersand destination registers. A so...

A: Annotations for the MIPS instructions mentioned in the question are given below-add $s1, $t2, $t3Add...

Q: please solve this in python  //////////////// //////////////// //////////////// ////////////////

A: A python program to display the boolean values for the given functions is provided below;Program cod...

Q: In C++ Create a function called Factor. It should output to the console all the factors of a number....

A: Note:C++ program should include header file “<iostream>”.This header file allows to perform st...

Q: What can you tell me about Python computer language?

A: Python programming language:Python is a high level programming language.It is widely used in commerc...