标签:
package nothh; public class mmm { public static void main(String[] args) { // TODO Auto-generated method stub //4到1的阶乘之和 int x = 0; int y = 0; int z = 4; while(z>=0) { x = z; for(int j = z - 1; j > 0; j--) { x = j * x; } z--; y = x+y; } System.out.println(y); } }
结果为33,正确
标签:
原文地址:http://www.cnblogs.com/shadowduke/p/4854455.html