Find Maximum ElementStep 1 of 4
1
2
3
4
Initialize the maximum
First, we need a variable to store the maximum value. Initialize it with the first element of the array. Add this line after the array declaration:
Loading editor...
Learning Objectives
- Understand array traversal
- Learn to track a running maximum
- Practice comparison operations