03 2020 档案

摘要:1. 分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) package learn; public class day05 { public static void main(String[] args) { int i=1; int sum 阅读全文
posted @ 2020-03-31 12:07 小沫啊 阅读(131) 评论(0) 推荐(0)
摘要:编写程序, 输入变量x的值,如果是1,输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none。(知识点:if条件语句) package learn; public class day04 { public static void main(String[] 阅读全文
posted @ 2020-03-26 12:22 小沫啊 阅读(179) 评论(0) 推荐(0)
摘要:1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package learn; import java.util.Scanner; public class day03 { public static void main(String[] args) { // T 阅读全文
posted @ 2020-03-24 11:25 小沫啊 阅读(149) 评论(0) 推荐(0)
摘要:1.已知a,b均是整型变量,写出将a,b两个变量中的值互换的程序。 package homework1; public class Name1 { public static void main(String[] args) { int a = 1; int b = 2; int c; //进行数据 阅读全文
posted @ 2020-03-19 11:53 小沫啊 阅读(126) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-07 17:02 小沫啊 阅读(108) 评论(0) 推荐(0)