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 10. 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: 15
Too many elements!!!
How many elements: 6
1: 9
2: 46
3: 8
4: 12
5: -2
6: 3
The largest element is: 46

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!