???????????
???????????? ???????[ 2013/1/10 9:50:23 ] ????????
?????????????????????????????????????????????????Fibonacci???С??????????????????
????[java] view plaincopyprint?
????if(index==1 || index==2){
????return 1;
????}
????if(index==1 || index==2){
????return 1;
????}
???????????????????????index???????????????е?顣???????????????????????
??????????????????????Σ???????????????????????????????????????????????????????f4?????????????f2??????f3?????????????f2???????????Щ??????????????????С??????£?????????????????????????????????????????????????????????????????????????????
??????n????
????????????????5????
??????????
????[java] view plaincopyprint?
????public class Factorial_Five {
????/**
????* time:2012.12.2
????* author:??????
????* description:?????n????
????*/
????public static void main(String[] args) {
????Factorial_Five factorial_Five=new Factorial_Five();
????int result=factorial_Five.factorial(5);
????System.out.println(result);
????}
????public int factorial(int index){
????if(index==1){
????return 1;
????}else{
????return factorial(index-1)*index;
????}
????}
????}
????public class Factorial_Five {
????/**
????* time:2012.12.2
????* author:??????
????* description:?????n????
????*/
????public static void main(String[] args) {
????Factorial_Five factorial_Five=new Factorial_Five();
????int result=factorial_Five.factorial(5);
????System.out.println(result);
????}
????public int factorial(int index){
????if(index==1){
????return 1;
????}else{
????return factorial(index-1)*index;
????}
????}
????}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11