package demo;
public class Demo {
public static void main(String[] args) {
int jc = getJc(5);
System.out.println(jc);
}
public static int getJc(int num){
int result = 1;
if(num > 1){
result = num * getJc(num -1);
}
return result;
}
}