C# 第二章 长度为7的数组的冒泡排序
来源:互联网 发布:dnf面板数据怎么看 编辑:程序博客网 时间:2024/06/11 16:56
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { int[] array = new int[7]; int i, j; int sll; for (i = 0; i < array.Length; i++) { Console.WriteLine("输入第{0}个成绩:",i+1); array[i] = int.Parse(Console.ReadLine()); } Console.WriteLine("排序前成绩:"); for (i = 0; i < array.Length; i++) { Console.Write("{0}\t", array[i]); } for (i = 0; i < array.Length - 1; i++) { for (j = 0; j < array.Length - 1 - i; j++) { if (array[j] > array[j + 1]) { sll = array[j]; array[j] = array[j + 1]; array[j + 1] = sll; } } } Console.WriteLine("排序后成绩:" ); for (i = 0; i < array.Length;i++ ) { Console.Write("{0}\t", array[i]); } Console.ReadLine(); } }}
0 0
- C# 第二章 长度为7的数组的冒泡排序
- 长度为7的数组,冒泡排序.
- 数组元素为10的冒泡排序
- C# 第二章冒泡排序
- 数组的冒泡排序
- 数组的冒泡排序.
- 数组的冒泡排序
- 数组的冒泡排序
- 数组的冒泡排序
- 数组的冒泡排序
- 数组的冒泡排序
- c#的冒泡排序
- C#的冒泡排序
- C#的冒泡排序
- C#学习笔记—数组的冒泡排序
- C#数组冒泡排序
- 长度为0的数组
- 长度为0的数组
- CharSequence和String的区别
- android 混淆和去除无用资源
- java初中级常用面试题
- Python中赋值、浅拷贝与深拷贝
- StringUtils.isEmpty和StringUtils.isBlank用法
- C# 第二章 长度为7的数组的冒泡排序
- Android修改信号格等级显示
- git配置user.name和user.email
- 微信小程序开发(一)
- 面试中经常出现的算法
- finished with non-zero exit value 1
- C# 可怜的冒泡排序!!!
- 阿里druid学习,号称最好的数据库连接池
- 公私钥转换成十六进制形式