摘要: 1 定义三个方法:getArea()求面积、getPer()求周长,showAll()分别在控制台输出长、宽、面积、周长。 package five; public class text1 { int lenght; int width; public void area() { System.ou 阅读全文
posted @ 2020-04-22 09:44 窦佳琪 阅读(142) 评论(0) 推荐(0)
摘要: 1.有10个评委打分,(去掉一个最高一个最低)求平均分 package four; public class text1 { public static void main(String[] args) { // TODO Auto-generated method stub int max = 0 阅读全文
posted @ 2020-04-16 11:52 窦佳琪 阅读(173) 评论(0) 推荐(0)
摘要: 1.定义长度位5的整型数组,输入他们的值,用冒泡排序后输出. package three; import java.util.Scanner; public class text1 { public static void main(String[] args) { // TODO Auto-gen 阅读全文
posted @ 2020-04-12 20:20 窦佳琪 阅读(161) 评论(0) 推荐(0)
摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 package two; public class text1 { public static void main(String[] args) { // TODO Auto-generated 阅读全文
posted @ 2020-04-09 11:48 窦佳琪 阅读(136) 评论(2) 推荐(1)
摘要: 1. 打印出所有的"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该数本身。例如:153是一个"水仙花数",因为153=1的三次方+5的三次方+3的三次方。(知识点:循环语句、条件语句) package one; public class text1 { public static 阅读全文
posted @ 2020-04-02 12:45 窦佳琪 阅读(172) 评论(0) 推荐(0)
摘要: 1. 分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) for: package flower; public class text1 { public static void main(String[] args) { // TODO Au 阅读全文
posted @ 2020-03-30 12:31 窦佳琪 阅读(203) 评论(0) 推荐(0)
摘要: 1.编写程序, 输入变量x的值,如果是1,输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none。(知识点:if条件语句) package jia; import java.util.Scanner; public class text2 { public 阅读全文
posted @ 2020-03-26 12:24 窦佳琪 阅读(176) 评论(0) 推荐(0)
摘要: 1impackage october; port java.util.Scanner; public class text1 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner i 阅读全文
posted @ 2020-03-22 20:55 窦佳琪 阅读(214) 评论(0) 推荐(0)
摘要: 1.package october; public class aita { public static void main(String[] args) { // TODO Auto-generated method stub int a=3; int b=5; int tmp; tmp=a; a 阅读全文
posted @ 2020-03-19 12:34 窦佳琪 阅读(80) 评论(0) 推荐(0)
摘要: package october; public class aita { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("窦佳琪"); } } 阅读全文
posted @ 2020-03-07 14:26 窦佳琪 阅读(54) 评论(1) 推荐(0)