Change History
Message: TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
Changed By: RandomVariable
Change Date: September 26, 2015 03:09AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src=http://i.imgur.com/8e683pR.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: September 26, 2015 03:00AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
guhVQ.png width= 100% height = 100%>
= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: September 26, 2015 02:44AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
ttp://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 03:13AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 03:10AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 03:07AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
= 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 03:06AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dzUN3nm.png width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
= 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 03:02AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/icalsRh.png width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 02:58AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
405 遞迴函數
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/ica<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
ht = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 02:54AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/ica<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 02:51AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/YYcWs4X.png width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
<img s<=http://i.i.i src= ur.com/Sdzd9ej.png g width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/ica<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 02:46AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/TN403AF.png width= 100% height = 100%>
<img src=http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src= .png src=http://i.imgur.com/YYcWs4X.png <=http://i.00% src= ur.com/Sdzd9ej.png g src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
<img s<i.i src= g width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/ica<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 26, 2015 02:39AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/FKD2OwK.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
00%>
src=http: http://i.imgur.com/KPQ5NfO.png width= 100% height = 100%>
<img src=ht<=http://i.ur. src= ur.com/xpZuAW1.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src= src=http://i.imgur.com/YYcWs4X.png <00% src= g src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
<img s<i.i src= g width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/ica<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 23, 2015 11:09AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src= FKD2OwK.png p://i.imgur.com/FKD2OwK.png width<=http://i.ght src= ur.com/qQaFmqy.png 果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
src=http: width= 100% height = 100%>
<img src=ht<ur. src= width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src= src=http://i.imgur.com/YYcWs4X.png <00% src= g src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
<img s<i.i src= g width= 100% height = 100%>
<img src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur.com/sJuMRUU.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/ica<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 23, 2015 11:05AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src= p://i.imgur.com/FKD2OwK.png width<ght src= 果
<img src=http://i.imgur.com/qQaFmqy.png width= 100% height = 100%>
402 尾端遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/jq5wAQQ.png width= 100% height = 100%>
結果檔:
src=http: width= 100% height = 100%>
<img src=ht<ur. src= width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/xpZuAW1.png width= 100% height = 100%>
403 尾端遞迴次方計算
原始檔:
<img src=http://i.imgur.com/sACvyCr.png width= 100% height = 100%>
結果檔:
<img src= src=http://i.imgur.com/YYcWs4X.png <00% src= g src=http://i.imgur.com/zZujNH7.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Sdzd9ej.png width= 100% height = 100%>
404 遞迴最大公因數
原始檔:
<img src=http://i.imgur.com/9Q3rgeB.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
<img s<i.i s401
00%>
407 尾瑞遞迴計算總和
moval]<=http://i.g s src= ur.com/yEguhVQ.png om/zZujNH7.png width= 100% height = 100%>
<img src=http://i.imgur.com/o8EAYeM.png width= 100% height = 100%>
<img src=http://i.imgur401
原始檔:
<img src= width= 100% height = 100%>
始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
mgur.com<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
401
原始檔:
<img src= width= 100% height = 100%>
始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
width= 100% height = 100%>
原始檔:
<img src=http://i.imgur.com/TLJ8ivl.png width= 100% height = 100%>
結果檔:
<img 401
原始檔:
<img src= width= 100% height = 100%>
src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.
401 遞迴階乘計算
原始檔:
<img src=http://i.imgur.com/JbgETPt.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
ht = 100%>
src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
<img src=http://i.imgur.com/MRNNNBz.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/vM20sqy.png width= 100% height = 100%>
<img src
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png width= 100% height = 100%>
= 100%<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
<img src=http://i.imgur.com/yEguhVQ.png <img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
dth= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/MUiTFyt.png width= 100% height = 100%>
<img src=http://i.imgur.com/9s7zNp2.png
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.i
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
<img src=http://i.imgur.com/t4voqdg.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgu<img src= width= 100% height = 100%>
執行結果
<img src= width= 100% height = 100%>r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/Xz5V7i5.png width= 100% height = 100%>
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
<img src=http://i.imgur.com/XTj1CZL.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/S1MKx0G.png width= 100% height = 100%>
<img src=http://i.imgur.com/fwO5t3K.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/dAWk6jk.png width= 100% height = 100%>
410 遞迴字串替換
原始檔:
<img src=http://i.imgur.com/OD53XAQ.png width= 100% height = 100%>
結果檔:
<img src=http://i.imgur.com/K2UEkMZ.png width= 100% height = 100%>
執行結果
<img src=http://i.imgur.com/lhf2nlP.png width= 100% height = 100%>
Changed By: RandomVariable
Change Date: March 23, 2015 10:58AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
Original Message
作者: RandomVariable
Date: March 23, 2015 02:14AM
TQC+ JAVA6 物件導向程式語言 - 第四類:遞迴程式設式
401
原始檔:
檔:
結果檔:
om/zZujNH7.png width= 100% height = 100%>
原始檔:
mgur.com
執行結果
401
原始檔:
width= 100% height = 100%>
原始檔:
結果檔:
原始檔:
src=http://i.imgur.com/OU7fW1K.png width= 100% height = 100%>
執行結果
原始檔:
結果檔:
ur.
401 遞迴階乘計算
原始檔:
401
原始檔:
結果檔:
執行結果
401
原始檔:
結果檔:
執行結果
401
原始檔:
結果檔:
執行結果
401
原始檔:
結果檔:
執行結果
width= 100% height = 100%>
結果檔:
src= width= 100% height = 100%>
執行結果
width= 100% height = 100%>
406 遞迴字串計算
原始檔:
結果檔:
407 尾瑞遞迴計算總和
原始檔:
= 100%
執行結果
408 遞迴字串反向
原始檔:
width= 100% height = 100%>
以 ABBA為例:
往下遞迴:
return countA("BBA")+1
return countA("BA")
return countA("A")
return countA("")+1
return 0
往回
return 0
reutnr 0+1=1
return 1
reutrn 1
reutnr 1+1 =2
407 尾瑞遞迴計算總和
原始檔:
執行結果
409 遞迴字串移除
原始檔:
結果檔:
http://i.imgur.com/2wmnvPP.png width= 100% height = 100%>
執行結果
409 遞迴字串移除
原始檔:
結果檔:
dth= 100% height = 100%>
結果檔:
409 遞迴字串移除
原始檔:
結果檔:
410 遞迴字串替換
原始檔:
結果檔:
執行結果
mgur.com/fwO5t3K.png width= 100% height = 100%>
imgur.com/MnHkQq1.png width= 100% height = 100%>
408 遞迴字串反向
原始檔:
結果檔:
執行結果
r.com/2wmnvPP.png width= 100% height = 100%>
執行結果
以 abcde 為例
往下呼叫:
bcde, a
cde, b
de, c
e,d
"",e
住下結束
往上回去
e,
e+d =ed
ed+c = edc
edc+b=edcb
edcb+a=edcba
完成
409 遞迴字串移除
原始檔:
結果檔:
執行結果
410 遞迴字串替換
原始檔:
結果檔:
執行結果