題組內容

五、以下C#程式Compress(source, m, n, target)功能,將 source 二維陣列 m*m,每 n*n 方塊內元素計算平均,壓縮為 target 二維陣列 (m/n)*(m/n)的一個元素值。 (共10分)
66a9e0b930b85.jpg

(四) 若 source = {{1, 2, 3, 4},{8, 9, 10, 11}, {15, 16, 17, 18}, {22, 23, 24, 25}}; m = 4, n = 2,請寫出呼叫執行 Compress()之後, target 的值。(3 分)