- 1、本文档共6页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
public class Array{
public static void main(String[] args) { //(1)求数组长度 //int score[] = new int[3]; //System.out.println(数组长度为 + score.length); // int score[] = {91,92,93,94,95,96}; // for (int x = 0; x score.length; x++) {// System.out.println(score[ + x +] = + score[x]);// } //(2)找出最高分和最低分// int score[] = {68,89,75,94,100,69,90};// int max = 0;// int min = 0;// max = min = score[0];// // for (int x = 0; x score.length; x++) {// if(score[x] max) {// max = score[x];// }// // if(score[x] min) {// min = score[x];// }// }// // System.out.println(最高分: + max);// System.out.println(最低分: + min); //(3)数组排序(低到高)// int score[] = {68,89,75,94,100,69,90};// for (int i = 1; i score.length; i++) {// for (int j = 0; j score.length; j++) {// if (score[i] score[j]) {// int temp = score[i];// score[i] = score[j];// score[j] = temp;// }// }// }// for (int i = 0; i score.length; i++) {// System.out.print(score[i] + \t);// } //(4)打印出每次排序的结果 // int score[] = {68,89,75,94,100,69,90};// for (int i = 1; i score.length; i++) {// for (int j = 0; j score.length; j++) {// if (score[i] score[j]) {// int temp = score[i];// score[i] = score[j];// score[j] = temp;// }// }// // System.out.print(第 + i +次排序的结果:\t);// for (int j = 0; j score.length; j++) {// System.out.print(score[j] + \t);// }// System.out.println();// // }// System.out.print(最终的排序结果为:\t);// for (int i = 0; i score.length; i++) {// System.out.print(score[i] + \t);// } //(5)数组与方法排序 (应用传递) int score[] = {67,89,69,90,100,85,75,90}; int age[]
您可能关注的文档
最近下载
- 汽轮机直接空冷系统工艺流程.doc
- 《电力设备预防性试验规程》.pdf VIP
- PCB制造各岗位考试试题.pdf VIP
- 中国蛇伤救治指南2024年版解读PPT课件.pptx VIP
- 亲子教育与游戏活动指导(0-3岁婴幼儿):0~1岁婴儿家庭亲子游戏活动指导PPT教学课件.pptx VIP
- 《0~3岁婴幼儿亲子活动设计与指导》项目3 0-1岁婴幼儿亲子活动设计与指导 教学课件.pptx VIP
- 中文版 IEC 61000-4-4-2012_(1-45,92)电磁兼容性 (EMC) — 第 4-4 部分:试验和测量技术 — 电快速瞬变脉冲群抗扰度试验.doc VIP
- 亲子教育与游戏活动指导(0-3岁婴幼儿):2~3岁幼儿家庭亲子游戏活动指导PPT教学课件.pptx VIP
- 某小区代建方案(投标文件)-secret.doc VIP
- 2023-2024学年辽宁省沈阳市郊联体高二(下)期末历史试卷.pdf VIP
文档评论(0)