solve(N, Src, Aux, Dst)
if N is 0 return
solve(N-1, Src, Dst, Aux)
Move N from Src to Dst
solve(N-1, Aux, Src, Dst)
Write the Java program based on the pseudocode in the above.
From =JAVA= |
From =JAVA= |
From =JAVA= |
From =JAVA= |
(FractionDemo)
=>將原本的程式改寫用"Fraction f1 = new Fraction (1, 2)"的方式
還要記得設定初始值!
*結論:差距越來越小逐漸趨近於0
(2)年收入:2000000