main.cpp x //Given a list of numbers find the largest and the smallest values of the list and display them. 1 2 3 #include 4 #include #include auto largest(std::vector list) { 7 8 10 } 11 auto smallest(std::vector list) { 12 13 14 15 } 16 17 int main() { 18 19 std::vector list({1,4,5,9,6,21,14,15,8,11}); 20 21 }

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 3E
icon
Related questions
Question

This.

main.cpp x
//Given a list of numbers find the largest and the smallest values of
the list and display them.
1
2
#include <iostream>
4
#include <vector>
#include <string>
6
auto largest(std::vector<int> list)
{
7
10
}
11
auto smallest(std::vector<int> list)
{
12
13
14
15
}
16
17
int main() {
18
19
std::vector<int> list({1,4,5,9,6,21,14,15,8,11});
20
21
}
Transcribed Image Text:main.cpp x //Given a list of numbers find the largest and the smallest values of the list and display them. 1 2 #include <iostream> 4 #include <vector> #include <string> 6 auto largest(std::vector<int> list) { 7 10 } 11 auto smallest(std::vector<int> list) { 12 13 14 15 } 16 17 int main() { 18 19 std::vector<int> list({1,4,5,9,6,21,14,15,8,11}); 20 21 }
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Perception
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr