subject

Please submit one zip file containing all source code, header, and output files. Exercise 1: 30 Points (Duplicate Elimination with vector) Use a vector to solve the following problem. Read in 20 numbers, each of which is between 10 and 100, inclusive. As each number is read, validate it and store it in the vector only if it isn't a duplicate of a number already read. After reading all the values, display only the unique values that the user entered. Begin with an empty vector and use its pushback function to add each unique value to the vector. SAMPLE RUN: Enter an integer: 105 Enter an integer: 5 Enter an integer: 10 Enter an integer: 11 Enter an integer: 11 Enter an integer: 12 Enter an integer: 13 Enter an integer: 14 Enter an integer: 15 Enter an integer: 15 Enter an integer: 16 Enter an integer: 17 Enter an integer: 18 Enter an integer: 19 Enter an integer: 20 Enter an integer: 21 Enter an integer: 22 Enter an integer: 23 Enter an integer: 24 Enter an integer: 25 Enter an integer: 26 Enter an integer: 27
Enter an integer: 28
Enter an integer: 29
Unique values in the vector are:
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 294

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
You know the right answer?
Please submit one zip file containing all source code, header, and output files. Exercise 1: 30 Poin...
Questions
question
Social Studies, 27.08.2019 10:10
question
Mathematics, 27.08.2019 10:20
question
Mathematics, 27.08.2019 10:20
question
Social Studies, 27.08.2019 10:20
Questions on the website: 13722366