摘要: public static void main(String[] args) { /* * 用for循环 */ int sum= 0;//定义变量计数器 for (int i = 1; i < 100; i++) { if (i%3==0) { sum +=i; } } System.out.pri 阅读全文
posted @ 2020-03-31 11:41 计算机1802王兆明 阅读(140) 评论(0) 推荐(0) 编辑
摘要: package hm; //第一题 import java.util.Scanner; public class classPractice3_26_01 { public static void main(String[] args) { Scanner sca = new Scanner(Sys 阅读全文
posted @ 2020-03-26 11:45 计算机1802王兆明 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 一. package hm; import java.util.Scanner; public class test3_20 { public static void main(String[] args) { Scanner r= new Scanner(System.in); System.ou 阅读全文
posted @ 2020-03-24 14:17 计算机1802王兆明 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1 二. 2 package hm; 3 /* 4 * 计算1--1000的个个位数相加 5 */ 6 import java.util.Scanner; 7 8 public class Practice01 { 9 10 public static void main(String[] args 阅读全文
posted @ 2020-03-19 12:04 计算机1802王兆明 阅读(62) 评论(0) 推荐(0) 编辑