import java.util.Scanner;public class Test { public static void main(String[] args) { count(); } public static void count() { Scanner input1 = new Scanner(System.in); System.out.println("输入一个数"); double a = input1.nextDouble(); while (true) { Sc…
01.代码如下: package TIANPAN; /** * 此处为文档注释 * * @author 田攀 微信382477247 */ public class TestDemo { public static void main(String[] args) { int sum = 0; // 保存累加的结果 int current = 1; // 初始值 for (; current <= 100; ) { // for循环 sum += current; // 累加计算 current…