Menu

[Solved]-Q1 Write C Code Coffee Shop Managements Help Monitor Production Country 5 Save Countries P Q37157916

using
#include <iostream>#include<string>
only

Q1: Write C++ code for coffee shop managements to help them monitor the production of Country (5] to save the countries ProdQ1: Write C++ code for coffee shop managements to help them monitor the production of Country (5] to save the countries’ Production (5] to save the countries’ coffee production in tons (I ton -1000 kg), as coffe from five different countries. You need to define two ID arrays, one of type string. names and the second of type integer, follows: Production in tons 224,871 257,940 2,859,502 423,287 385,786 Country Guatemala Mexico Brazil Ethiopia India 110 marks] Write a function read that reads the name of the country and the coffee a. production from the user input and stores them in the arrays Country and Production. In the main function, call the function read to update the content of the arrays. Function prototype: void read (atring Countryt, int Production (], int size) b. [10 marks] Write a function Sort that sorts Country array in an alphabetical order. Please note that the Production array must be updated accordingly. Update the main function to call the function Sort to reorder the arrays Country and Production. Function prototype: void Sort (string Country[1, int Production[), int size): Below is a sample input and its corresponding sample output Input Country Production Guatemala Mexico Brazil Ethiopia 224871 257940 2859502 423287 385786 India Output Country Productiorn Brazi Ethiopia Guatemala India Mexico 2859502 423287 224871 385786 257940 Show transcribed image text Q1: Write C++ code for coffee shop managements to help them monitor the production of Country (5] to save the countries’ Production (5] to save the countries’ coffee production in tons (I ton -1000 kg), as coffe from five different countries. You need to define two ID arrays, one of type string. names and the second of type integer, follows: Production in tons 224,871 257,940 2,859,502 423,287 385,786 Country Guatemala Mexico Brazil Ethiopia India 110 marks] Write a function read that reads the name of the country and the coffee a. production from the user input and stores them in the arrays Country and Production. In the main function, call the function read to update the content of the arrays. Function prototype: void read (atring Countryt, int Production (], int size) b. [10 marks] Write a function Sort that sorts Country array in an alphabetical order. Please note that the Production array must be updated accordingly. Update the main function to call the function Sort to reorder the arrays Country and Production. Function prototype: void Sort (string Country[1, int Production[), int size): Below is a sample input and its corresponding sample output Input Country Production Guatemala Mexico Brazil Ethiopia 224871 257940 2859502 423287 385786 India Output Country Productiorn Brazi Ethiopia Guatemala India Mexico 2859502 423287 224871 385786 257940

Expert Answer


Answer to using #include #includeonly … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *