Max Value
Lesson 4 of 18 in Coddy's Functions in C++: Building Your Own Functions course.
Challenge
EasyWrite a function to find the maximum value in a list.
The max function takes a list of numbers and returns the maximum value.
For example:
If the input list is [
3, 5, 1, 7], the result will be 7.
Try it yourself
#include <iostream>
#include <vector>
using namespace std;
int max() {
}All lessons in Functions in C++: Building Your Own Functions
1Introduction
Introduction2Beginner-level function
Repeat a StringReverse a StringMax ValueFill stringCenter TextFormat TextMath Operation