首页 > 代码库 > [Algorithms] recursive

[Algorithms] recursive

python


shell



java

class Recursive{

	public static void main(String[] args){

		System.out.println(recursive(5));

	}

	public static int recursive(int i){

		if(i == 1){
			return 1;
		}
		return i * recursive(i-1);
	}

}


[Algorithms] recursive