subject

Find max Traversing a vector to find the max (or min) is common. Given a vector of integers, output the maximum integer found in the vector. If the input is 43 8 26, the output is 8. Hints: • Declare a variable named maxitem to hold the max value seen so far. Update that value if you ever see a larger value. • Initialize that variable to any element's value, NOT to 0. 262108.1539616 LAB ACTIVITY 11.11.1: LAB Vectors: Find max 0/10 main. cpp Load default template... 2 #include 3 using namespace std; 4 5 int main() { 6 int numitems; 7 vector int> listItems; int curritem; 9 int i; 10 11 // Get items 12 cin >> numitems; 13 for (i = 0; i < numItems; ++i) { 14 cin >> currItem; 15 listItems. push_back(curritem); 16 } 17 18 /* Type your code here */ 19 20 return; 21 ) Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
You know the right answer?
Find max Traversing a vector to find the max (or min) is common. Given a vector of integers, output...
Questions
question
English, 20.03.2020 20:10
question
Mathematics, 20.03.2020 20:11