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