// Declare an array of integers
INTEGER_ARRAY = [5, 10, 3, 8, 15, 2]
// Initialize variables to store maximum and minimum values
MAX_VALUE = INTEGER_ARRAY[0]
MIN_VALUE = INTEGER_ARRAY[0]
// Iterate through the array to find maximum and minimum values
FOR i = 1 to LENGTH(INTEGER_ARRAY) - 1 DO
IF INTEGER_ARRAY[i] > MAX_VALUE THEN
MAX_VALUE = INTEGER_ARRAY[i]
IF INTEGER_ARRAY[i] < MIN_VALUE THEN
MIN_VALUE = INTEGER_ARRAY[i]
// Display the maximum and minimum values
PRINT("Maximum value:", MAX_VALUE)
PRINT("Minimum value:", MIN_VALUE)