「遞增法」是符合電腦運作特性的方法.電腦執行程式,一次只做一個動作,完成了一件事才做下一件事.當一個問題太大太多時,化整為零.一個一個解決吧! 合抱之木,生於毫末:九層之臺,起於累土:千里之行,始於足下.謹以此句與大家共勉. 範例:加總數字 無論電腦再怎麼強,還是得一個一個累加數字. void summation() { int array[5] = {3, 6, 9, -8, 1}; int sum = 0; for (int i=0; i<5; i++) sum += array[i]; c…