摘要:
package com.company; import java.util.*; public class Main { public static void main(String arg[]) { System.out.println("请输入一个数字"); Scanner input =new 阅读全文
摘要:
package com.company; import java.util.*; public class Main { public static void main(String arg[]) { Scanner input = new Scanner(System.in); double su 阅读全文
摘要:
package com.company; public class Main { public static void main(String arg[]) { int sum=0,i,j; for(i=1;i<=10;i++){ if(i%2==0){ //计算1+3+5+7+9 continue 阅读全文
摘要:
package com.company; //计算1+1/2+1/3+1/4....前20项 public class Main { public static void main(String arg[]) { double sum = 0, item = 1; int i = 1, n = 20 阅读全文
摘要:
package com.company; //计算1+1/2!+1/3!+1/4!....前20项 public class Main { public static void main(String arg[]) { double sum = 0, item = 1; int i = 1, n = 阅读全文
摘要:
package com.company; //计算8+88+888+8888+....前20项的和 //分析:规律 88=8*10+8 public class Main { public static void main(String arg[]) { long sum=0,a=8,item=a, 阅读全文
摘要:
package com.company; import java.util.Scanner; public class Main { public static void main(String arg[]) { System.out.println("请输入一门成绩:"); Scanner inp 阅读全文