Question: PLZ READ Requirements: use 2 functions paremeter to first function should be the size of the array, than you fill up the array in main,

PLZ READ
Requirements:
use 2 functions
paremeter to first function should be the size of the array, than you fill up the array
in main, pass size to find median function
.Use passing and returning
.must use this lines of code
.add $a1,$0,$t5 # Passing to function by $a1
add $a2,$0,$t6 # Passing to function by $a2
.add $t0, $v1, $0
.add $t5,$0,$a1 # Passing to function by $a1
add $t6,$0,$a2 # Passing to function by $a2
.add $v1, $t7, $0 # returning the result to main
Look at photo provided plz uses Mips Main prints the madian
How many number you like to enter: 9
Enter number 1: 10
Enter number 2: 20
Enter number 3: 30
Enter number 4: 40
Enter number 5: 50
Enter number 6: 60
Enter number 7: 70
Enter number 8: 80
Enter number 9: 90
The median is: 50
How many number you like to enter: 6
Enter number 1: 11
Enter number 2: 15
Enter number 3: 16
Enter number 4: 18
Enter number 5: 212
Enter number 6: 220
The median is: 17
===============================
How many number you like to enter: 6
Enter number 1: 11
Enter number 2: 15
Enter number 3: 18
Enter number 5:23
Enter number 6: 220
Enter number 7: 221
The median is: 20
===============================
the middle is 20.5 in the last case but since we only deal with integer we get the integer part
which is 20.
PLZ READ
Requirements:
use 2 functions
paremeter to first function should be the size of the array, than you fill up the array
in main, pass size to find median function
.Use passing and returning
.must use this lines of code
.add $a1,$0,$t5 # Passing to function by $a1
add $a2,$0,$t6 # Passing to function by $a2
.add $t0, $v1, $0
.add $t5,$0,$a1 # Passing to function by $a1
add $t6,$0,$a2 # Passing to function by $a2
.add $v1, $t7, $0 # returning the result to main
 PLZ READ Requirements: use 2 functions paremeter to first function should

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!