黑马程序员技术交流社区
标题:
1-10的阶乘
[打印本页]
作者:
微笑的背后3
时间:
2015-9-5 00:07
标题:
1-10的阶乘
class JieCheng
{
public static void main(String[] args)
{
int n = 1;
for(int x=1;x<=10;x++){
System.out.print(x+"!=");
for(int y=1;y<x;y++){
System.out.print(y+"*");
}
n *= x;
System.out.println(x+"="+n);
}
}
}
作者:
G_Y_C黑马
时间:
2015-9-5 21:23
哥们,那1-100怎么弄呢
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2