赞
踩
/**
*计算5的阶乘:
* 5!=5*4*3*2*1
*@author 马涛
* April 14th,2009
*/
public class Five
{
public static void main(String[] args)
{
int a =5;
for(int b= 4; b>=1 ;b-- )
{
a*=b;
}
System.out.println("5! = "+a);
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。