Question: Program Specifications Write a program to calculate the minimum, maximum, mean, median, mode, and whether an array is a palindrome. Note: This program is designed
Program Specifications Write a program to calculate the minimum, maximum, mean, median, mode, and whether an array is a palindrome.
Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.
Step Review the starter code in main An array is declared and initialized with integers from input in an unsorted order. The first value indicates how many integers are to follow and be placed in the array.
Step pts Use a loop to process each array element and output the minimum and maximum values. Submit for grading to confirm one test passes.
Ex: If input is:
the output is:
Minimum: Maximum:
Step pts Use a loop to sum all array elements and calculate the mean or average Output the mean with one decimal place using printfMean: f
mean; Submit for grading to confirm two tests pass.
Ex: If input is:
the output is:
Minimum: Maximum: Mean:
Step pts Use a loop to determine if the array is a palindrome, meaning values are the same from front to back and back to front. Output "true" or "false". Submit for grading to confirm three tests pass.
Ex: If input is:
the output is:
Minimum: Maximum: Mean: Palindrome: true
Step pt Read from input the values into the same array but in an ascending order. Identify the median. The median is located in the middle of the array if the array's size is odd. Otherwise, the median is the average of the middle two values. Output the median with one decimal place. Note: The array is read two times, an unsorted array for Step through Step and a sorted array for Step and Step Submit for grading to confirm four tests pass.
Ex: If input is:
the output is:
Minimum: Maximum: Mean: Palindrome: false Median:
Step pts Challenging! Identify the mode of the sorted array. The mode is the value that appears most frequently. Assume only one mode exists. Hint: Use a loop to process each array element, looking for the longest sequence of identical values. Submit for grading to confirm all tests pass.
Ex: If input is:
The output:
Minimum: Maximum: Mean: Palindrome: false Median: Mode:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
