讓我們從下面的範例開始. 範例:由1 加到10. 疊代(iterative) 方式:. 這個要求可以用一個簡易的for 迴圈來達成. int sum(int n) { int i; int tmp=0; ...
確定! 回上一頁