这是本人学习C#写的第一段代码,键入数组,并且读取数组最后,调用冒泡排序的方法实现,键入数组的排序
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test8
{
class Program
{
static void Main(string[] args)
{
int[] str = new int [5];
for(int i=0;i<str.Length;i++)
{
Console.WriteLine("请输入第{0}个数字",i);
string s=Console.ReadLine();
str[i]=Convert.ToInt32(s);
}
int []str2=MaoPao(str);
for (int n = 0; n <= str.Length; n++)
{
Console.WriteLine(str2[n]);
}
Console.ReadKey();
}
public static int