string[] kk={"关羽","张飞","赵云","马超","黄忠"};//请在这里完善代码
for (int i=0;i<kk.length;i++)
{
Console.Write(kk[i]+",");
}
for (int i=0;i<kk.length;i++) 应该改成 for (int i=0;i<kk.Length;i++)
这里的Length 要大写
没错的。你用自己软件编译运行就知道,系统问题别介意
string str = k[i];
此行代码,多写的!
string[] k = { "关羽", "张飞", "赵云", "马超", "黄忠" };
for (int i = 0; i < k.LongLength; i++)
{
string str = k[i];
Console.Write(k[i] + " ");
}
Console.ReadKey();