問題詳情

四、試將下列階乘函數改以遞迴方式撰寫。(20 分)int fact(int n){int i, result = 1;for (i = 1; i <= n; i=i+1)result = result * i;return result;}

參考答案