[不知] 誠徵季節作業一份
Problem:
Write a MIPS assembly language program to sort an integer
array in ascending order, compute its average, and then print the
results.
There is a built-in twenty elements array:
[ 8, 10, 19, 25, 7, 18, 22, 6, 9, 12, 2, 5, 23, 14, 28, 21, 11, 26, 1, 13 ]
The MIPS program must do the following work:
First, ask the user to input two integers a, b from keyboard console.
( a may be largerthan, or smaller than b)
Truncate the array from element a to element b
Sort the truncated array in ascending order.
Compute the average of the numbers in the truncated array.
Then print the results.
Example:
If the inputs are a= 12, b=7, the program generates a sub-array
as [22, 6, 9, 12, 2,5]. Then the array is sorted, its average is computed.
The sorted output [2, 5, 6, 9, 12,22] and
the average= (2+5+6+9+12+22)/6=?? must be printed on the screen for
examination.
ㄜ...這是我學校要交的作業啦!
當然不可能請各位大大幫我寫這樣太機車了 ...
天底下沒白吃的午餐阿!!
所以....請各位大大來信洽詢...這是有酬勞的喔....
我要交的東西當然就是程式碼還有把結果印出來就okla
順便開個價吧^__^
對各位大大來說這應該只是舉手之勞吧??
多謝樓!!
來信請洽 ptt id vikingss 的信箱
或者qooood@yahoo.com.tw
再次多謝 ^__^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.31.138.49
噓
140.112.244.174 04/18, , 1F
140.112.244.174 04/18, 1F
噓
140.112.90.74 04/18, , 2F
140.112.90.74 04/18, 2F
噓
140.112.30.82 04/18, , 3F
140.112.30.82 04/18, 3F
噓
140.112.30.82 04/18, , 4F
140.112.30.82 04/18, 4F
→
140.112.244.175 04/18, , 5F
140.112.244.175 04/18, 5F
噓
59.112.213.136 04/18, , 6F
59.112.213.136 04/18, 6F
→
140.112.246.171 04/18, , 7F
140.112.246.171 04/18, 7F
→
140.112.246.171 04/18, , 8F
140.112.246.171 04/18, 8F
噓
203.73.233.68 04/19, , 9F
203.73.233.68 04/19, 9F
噓
59.104.93.114 04/19, , 10F
59.104.93.114 04/19, 10F
推
61.230.104.206 04/19, , 11F
61.230.104.206 04/19, 11F
→
140.112.30.114 04/19, , 12F
140.112.30.114 04/19, 12F
噓
202.178.191.13 04/19, , 13F
202.178.191.13 04/19, 13F
噓
140.112.222.211 04/20, , 14F
140.112.222.211 04/20, 14F
噓
140.112.30.116 04/25, , 15F
140.112.30.116 04/25, 15F