03 2020 档案
摘要:1. 分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) package text1; public class school1 { public static void main(String[] args) { // TODO Auto-g
阅读全文
摘要:1.输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none。(知识点:if条件语句) package text1; import java.util.Scanner; public class test14 { public static void mai
阅读全文
摘要:1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) //输入年份 判断是否是闰年(能被4整除但不能被100整除,或者能被400整除) @SuppressWarnings("resource") Scanner sc=new Scanner(System.in); i
阅读全文
摘要:1、已知a,b均是整型变量,写出将a,b两个变量中的值互换的程序。(知识点:变量和运算符综合应用) int a=1; int b=2; int c=0; c=a; a=b; b=c; System.out.println(a+","+b); 2、给定一个0~1000的整数,求各位数的和,例如345的
阅读全文
摘要:package text1; public class text1 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("hello"); System.ou
阅读全文
浙公网安备 33010602011771号