public class MyFibonacci {
public static void main(String a[]){
int febCount = 15;
int[] feb = new int[febCount];
feb[0] = 0;
feb[1] = 1;
for(int i=2; i < febCount; i++){
feb[i] = feb[i-1] + feb[i-2];
}
for(int i=0; i< febCount; i++){
System.out.print(feb[i] + " ");
}
}
}
我需要添加什麼以便我可以反轉印刷的fiboonaci系列?斐波那契序列和反向的遞歸二叉樹類
你是什麼意思的「反向」? –
如果它的緊急是因爲你的作業到期了,那麼我建議你開始編碼它們。我們將在特定問題上提供幫助 –
打印數字時,您不能從數組的最後到數組的開頭循環嗎? – SamTebbs33