Read five names into a vector name, then prompt the user for the ages of the people
Question:
Read five names into a vector name, then prompt the user for the ages of the people named and store the ages in a vector age. Then print out the five (name[i],age[i]) pairs. Sort the nam es (sort(name .begin(),name.end())) and print out the (name[i],age[i]) pairs. The tricky part here is to get the age vector in the correct order to match the sorted name vector.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (10 reviews)
include stdlibfacilitiesh note that different compilersSDEs keep header files in different places so ...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
In this assignment, you are writing a program that converts common texting abbreviations to English words to allow people like yours truly can understand. For the assignment, you are provided with a...
-
Complete the following tasks: a. Create a class named Order that performs order processing of a single item. The class has four fields: customer name, customer number, quantity ordered, and unit...
-
In this project, we will make up a banking system. You are an employee of MadeUp Banking. Your job is to manage multiple bank accounts. Here, you would create new accounts, deposit to an account,...
-
The Qantas Group includes a sustainability report in its annual report. What key performance indicators are included in this report? Explain the different stakeholders that would be interested in...
-
Exercise 4 in Module 3 gave the following number of TV sets in homes. 2, 3, 1, 2, 3, 0, 2, 4, 1, 2, 4, 3, 2, 1, 1, 3, 0, 2, 1, 1, 2, 3, 2, 5, 2 Find the (a) mode, (b) median (ballpark), and (c) mean...
-
Classify the following items as an asset (A), a liability (L), or stockholders equity (S) for Target Corporation, a large retailer: a. ________ Land b. ________ Accrued expenses payable c. ________...
-
Data set: Systolic blood pressure levels (in millimeters of mercury) of 28 patients Construct a frequency distribution and a relative frequency histogram for the data set using five classes. Which...
-
SunTrust Banks owns a large block of Coca-Cola Company (Coke) common stock that it has held for many years. SunTrust indicates in a note to its financial statements that all equity securities held by...
-
1. Write a program in python to get the number of rows using GUI. If the user entered less than 4 rows, display the message not to enter less than 4 rows and allow the user to enter again. For...
-
Module COUNT is a 3-bit binary up-counter with parallel load. While load=0, counter increases by 1 each time a positive edge of clk occurs. If load= 1, entries are loaded into the counter at the next...
-
Write versions of the functions from exercise 5, but with a vector. Data from Exercise 5 Write two functions that reverse the order of elements in a vector. For example, 1, 3, 5, 7, 9 becomes 9, 7,...
-
What good does indentation do?
-
State the type of expenditure, capital or revenue, incurred in the following transactions (a) Break-down van purchased by a garage. (b) Repairs to a fruiterers van. (c) The cost of installing a new...
-
Terry bought a house for 65,000 on 1 June 1997 and occupied the house as his principal private residence. He lived in the house until 1 June 2003 when he went to stay with relatives in Australia,...
-
Jeremy acquired the following ordinary shares in Scarlon plc: Date 19 September 2009 20 October 2011 21 November 2013 22 December 2017 13 January 2018 No of shares 4,000 2,000 1,000 3,000 5,000 Cost...
-
In May 2012, Ruth sold a freehold building which she had used exclusively for business purposes. The building was sold for 220,000, realising a chargeable gain of 42,500. In the following month, Ruth...
-
Sandra acquired the following ordinary shares in Pincom plc: Date 29 January 1995 13 August 1999 4 October 2011 No of shares (a) 8,400 (b) 6,300 (c) 5,200. 1,000 1,000 2,000 Cost 4,000 9,500 22,500...
-
Rupert bought a house in Manchester on 1 November 1995 for 75,000. He occupied the house until 1 November 1999 when he left to work abroad for a year, moving back into the house on 1 November 2000....
-
Instead of a system of individual performance appraisals, Nucor appraises employee performance according to division-wide quality, productivity, and profitability goals and targets. What are the...
-
on 8 For the following set of lengths 130, 170, 160, 160, 150, 190 Third quartile is: et red d out of Select one: O a. 160 a question O b. 145 O c. 175 O d. 180
-
How many IP addresses and how many link-layer addresses should a router have when it is connected to five links?
-
Figure 9.7 shows a system as either a host or a router. What would be the actual entity (host or router) of system A and B in each of the following cases: Figure 9.7 a. If the link is the first one...
-
Define framing and give the reason it is needed.
-
American X wishes to borrow U.S. dollars at a fixed rate of interest. Corporation Y wishes to borrow Japanese Yen at a fixed rate of interest. The amounts required by the two companies are the same...
-
Bunga Raya Kuning Berhad is a Malaysian-based MNC that obtains 12 percent of its supplies from the U.K. manufacturers. Sixty-five percent of its revenues are from due to exports to U.K. where its...
-
Trevor's Tool Shop is considering investing in a new machine. The company currently has $500,000 per year in sales. The company has $265,000 per year in net income. If the company invests in the new...
Study smarter with the SolutionInn App