Question: In Mips , when asked how many elements it should not take negative numbers Write a program to find the largest element of an array,
In Mips when asked how many elements it should not take negative numbers
Write a program to find the largest element of an array, the array size should be less than or
equal to You need to use FindMax function to find the maximum of the array.
You read the number of elements or array size
If the array size is within the range, pass the array size to the FindMax function.
In FindMax function, find the maximum of the array and return it to main.
In main print the maximum.
Example:
How many elements:
Too many elements!!!
How many elements:
:
:
:
:
:
:
The largest element is:
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
