摘要: 1.有10个评委打分,(去掉一个最高一个最低)求平均分。 package com.run.test; import java.util.Random; public class One { public static void main(String[] args) { Random r=new R 阅读全文
posted @ 2020-04-16 12:32 风见崎鸣 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1.定义长度位5的整型数组,输入他们的值,用冒泡排序后输出. package com.run.test; import java.util.Scanner; public class One { public static void main(String[] args) { int[] num = 阅读全文
posted @ 2020-04-16 03:10 风见崎鸣 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 public class One { public static void main(String []args) { int[] my= {10,20,30,40,50}; for (int i 阅读全文
posted @ 2020-04-09 11:42 风见崎鸣 阅读(165) 评论(1) 推荐(1) 编辑
摘要: 1. 打印出所有的"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该数本身。例如:153是一个"水仙花数",因为153=1的三次方+5的三次方+3的三次方。(知识点:循环语句、条件语句) public class One { public static void main(Stri 阅读全文
posted @ 2020-04-02 12:44 风见崎鸣 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1.用for,while,do循环求1到100能被3整除的整数和。 //forpublic class One { public static void main(String[] args) { int sum=0; for (int i = 0; i<=100; i++) { if (i%3== 阅读全文
posted @ 2020-03-31 02:17 风见崎鸣 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1. 输入变量x的值,如果是1,输出x=1,如果是5,输出x=5,如果是 10,输出 x=10,除了以上几个值,都输出x=none(if版) import java.util.*; public class One { public static void main(String[] args) { 阅读全文
posted @ 2020-03-26 12:02 风见崎鸣 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.判断闰年 import java.util.*; public class One { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("请输入 阅读全文
posted @ 2020-03-23 01:26 风见崎鸣 阅读(155) 评论(0) 推荐(0) 编辑
摘要: public class LianXi { public static void main(String[] args) { int a=2; int b=5; int c; c=a; a=b; b=c; System.out.println("a="+a+"\tb="+b); } } 2.给定一个 阅读全文
posted @ 2020-03-19 11:48 风见崎鸣 阅读(77) 评论(0) 推荐(0) 编辑
摘要: package test; public class holle { public static void main(String[] args) { System.out.println("hello eclipse"); } } 阅读全文
posted @ 2020-03-07 02:37 风见崎鸣 阅读(82) 评论(0) 推荐(0) 编辑