📄 testfunction2.java
字号:
public class TestFunction2{
public static void main(String args[]){
TestFunction2 test=new TestFunction2();
test.factorial(3);
test.factorial(6);
test.factorial(9);
}
static void factorial(int n){
int x=n;
long m=1;
for (;x>0;x--)
m*=x;
System.out.println(n+"!="+m);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -