摘要: 1.编写一个方法,实现冒泡排序(由小到大),并调用该方法 package one; public class sn { public static void main(String[] args) { // TODO Auto-generated method stub int a[]={5,4,3 阅读全文
posted @ 2023-06-04 00:18 史孟琦 阅读(22) 评论(0) 推荐(0)
摘要: 1、给定一个有9个整数(1,6,2,3,9,4,5,7,8)的数组,先排序,然后输出排序后的数组的值。 package one; import java.util.Arrays; public class sn { public static void main(String[] args) { / 阅读全文
posted @ 2023-06-04 00:14 史孟琦 阅读(21) 评论(0) 推荐(0)
摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值 package one; import java.util.Scanner; public class sn { public static void main(String[] args) { / 阅读全文
posted @ 2023-06-04 00:09 史孟琦 阅读(37) 评论(0) 推荐(0)
摘要: 1、使用for循环计算1-100的和,除了以3结尾的那些数 package one; public class sn { public static void main(String[] args) { // TODO Auto-generated method stub int sum=0; fo 阅读全文
posted @ 2023-06-04 00:01 史孟琦 阅读(21) 评论(0) 推荐(0)