- 10
- 0
- 约4.92千字
- 约 5页
- 2016-09-17 发布于江苏
- 举报
C# 实现线性表.doc
C# 实现顺序表
1、测试类
class Program
{
static void Main(string[] args)
{
Console.Write(请输入线性表的最大长度:);
int max = Convert.ToInt32(Console.ReadLine());
List list = new List(max);
Console.WriteLine();
Console.Write(请输入若干数据(数据间用“/”隔开):);
string str1 = Console.ReadLine();
string[] str2 = System.Text.RegularExpressions.Regex.Split(str1, /);
for (int i = 0; i str2.Length; i++)
{
list.initList(i, Convert.ToInt32(str2[i]));
}
Console.Writ
原创力文档

文档评论(0)