package com.aaa; //求10!的阶乘 public class Cheng { public static void main(String[] args) { int s=1; for(int i=1;i<11;i++){ s*=i; }System.out.println("10!="+s); } }
package com.aaa; //求10!的阶乘 public class Cheng { public static void main(String[] args) { int s=1; for(int i=1;i<11;i++){ s*=i; }System.out.println("10!="+s); } }