Java代码实现1到100的连乘计算
public class MultiplyNumbers {
public static void main(String[] args) {
int result = 1;
for (int i = 1; i <= 100; i++) {
result *= i;
}
System.out.println('The product of numbers from 1 to 100 is: ' + result);
}
}
原文地址: http://www.cveoy.top/t/topic/mf42 著作权归作者所有。请勿转载和采集!