摘要: 1.编写程序, 输入变量x的值,如果是1,输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none。(知识点:if条件语句) package snippet;import java.util.*; public class text { public sta 阅读全文
posted @ 2020-03-26 12:28 Ambtion 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package snippet;import java.util.Scanner;public class text { public static void main(String[] args) { // TO 阅读全文
posted @ 2020-03-23 21:28 Ambtion 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1、已知a,b均是整型变量,写出将a,b两个变量中的值互换的程序。(知识点:变量和运算符综合应用) package snippet; public class text { public static void main(String[] args) { int a=400; int b=500; 阅读全文
posted @ 2020-03-19 19:53 Ambtion 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-03-06 18:21 Ambtion 阅读(79) 评论(0) 推荐(0) 编辑