03 2020 档案

摘要:1. 分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) public class Zuoye13 { public static void main(String[] args) { int i,sum=0; for(i=1;i<=100;i 阅读全文
posted @ 2020-03-30 15:20 樊一丁 阅读(148) 评论(0) 推荐(0)
摘要:1.编写程序, 输入变量x的值,如果是1,输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none。(知识点:if条件语句) import java.util.Scanner; public class Zuoye8 { public static void 阅读全文
posted @ 2020-03-26 11:49 樊一丁 阅读(191) 评论(0) 推荐(0)
摘要:1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package finish; import java.util.Scanner; public class Zuoye4 { public static void main(String[] args) { Sc 阅读全文
posted @ 2020-03-20 18:39 樊一丁 阅读(168) 评论(0) 推荐(0)
摘要:public class Zuoye { public static void main(String[] args) { int a=10; int b=8; int c; c=a; a=b; b=c; System.out.println("a="+a+","+"b="+b); } 1、已知a, 阅读全文
posted @ 2020-03-19 11:40 樊一丁 阅读(168) 评论(0) 推荐(0)
摘要:package finish; public class Test { public static void main(String[] args) { System.out.println("HELLO"); System.out.println("Kitty"); } } 阅读全文
posted @ 2020-03-06 20:12 樊一丁 阅读(205) 评论(0) 推荐(0)