Challenge 1: Find the Maximum Value
Explore how to create a Perl method named Find_Maximum() that identifies the largest integer in an array. This lesson helps you practice array manipulation and understand how to process arrays effectively in Perl through hands-on coding.
We'll cover the following...
We'll cover the following...
Problem statement
Write a method named Find_Maximum() to find the maximum integer value stored in an array.
Input
The array passed as a parameter.
Output
The maximum value found in the array.
Sample Input & Output
Input: {15, 6, 3, 21, 19, 4}
Output: 21
Coding challenge
Think over the problem carefully and write your code below. It’s recommended that you try solving the problem by yourself before referring to the solution part.
Good luck!