C++ Beginner · exercise 07
Standard algorithms
Sort torque samples, sum them and find the peak with the standard library.
C++ Beginner lesson 07Guided steps
- 1.Sort the samples ascending with std::sort and print them on one line.
- 2.Add them with std::accumulate and print the sum.
- 3.Find the largest with std::max_element and print it.
Your code
Your code is saved in this browser after every run and restored next time.