android 自定义软键盘 键盘怎么自定义改键
编程实现用冒泡法将键盘输入的10个整数按从小到大的顺序排序要求排序功能用自定义函数实现
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 小测试吧{class Classone{static void Main(){int[] arr = new int[10];for (int i = 0; i < 10; i++){arr[i] = int.Parse(Console.ReadLine ());}sort(ref arr);for (int i = 0; i < 10; i++){Console.WriteLine(arr[i]);}}public static void sort(ref int[] array){int temp;for (int i = 0; i < array.Length - 1; i++){for (int j = i + 1; j < array.Length; j++){if (array[j] < array[i]){temp = array[i];array[i] = array[j];array[j] = temp;}}}}}}