public static void main(String[] args) {
//求5的阶乘(5!=5*4*3*2*1)
int num=1;
for(int a=1;a<=5;a++){
num*=a;
}System.out.println("五的阶乘为:"+num);
}
07-10
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交