本帖最后由 12560zhang 于 2014-3-6 22:26 编辑
- <div class="blockcode"><blockquote>public class Test {
- public static void main(String[] args) {
- int n=1;
- int sum =1;
- do
- {
- n++;
- sum *= n;
- System.out.println(sum+" "+n);
- System.out.println("sum="+sum+"*"+n+"="+sum*n);
- }while(sum<=400000);
- System.out.println("n="+(n-1));
- }
- }
复制代码
|