JAVA作业:编写一个程序,求满足1+2!+3!+...+n!
人气:404 ℃ 时间:2020-07-05 02:37:19
解答
楼上的两个答案都不对.都忘了将 n -1 .public class TestNFactorial {public static void main(String[] args){int target = 9876;run(target);}private static void run( int target) {int sum = 0 ;int n=0;while(...
推荐
猜你喜欢