03 2020 档案

摘要:1. 分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) package come.itheima01; public class Sz { public static void main(String[] args) { int sum = 阅读全文
posted @ 2020-03-31 17:29 Silent222 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1.编写程序, 输入变量x的值,如果是1,输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none。(知识点:if条件语句) package come.itheima01; import java.util.Scanner; public class Hel 阅读全文
posted @ 2020-03-26 11:44 Silent222 阅读(124) 评论(0) 推荐(0) 编辑
摘要:1、输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package come.itheima01; import java.util.Scanner; public class Hello { public static void main(String[] arg 阅读全文
posted @ 2020-03-24 12:31 Silent222 阅读(130) 评论(0) 推荐(0) 编辑
摘要:1、已知a,b均是整型变量,写出将a,b两个变量中的值互换的程序。(知识点:变量和 运算符综合应用) package come.itheima01; public class Hello { public static void main(String[] args) { int a=3; int 阅读全文
posted @ 2020-03-19 19:56 Silent222 阅读(113) 评论(0) 推荐(0) 编辑
摘要:package come.itheima01; public class HelloWorld { public static void main(String[] args){ System.out.println("HelloWord"); }} 阅读全文
posted @ 2020-03-08 21:22 Silent222 阅读(78) 评论(0) 推荐(0) 编辑