作业帮 > 综合 > 作业

static void Main(string[] args)

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/24 17:28:59
static void Main(string[] args)
{
string[] friendNames = { "Robert Barwell","Mike Parry","Jeremy Beacock" };
int i;
Console.WriteLine("Here are {0} of my friends:",friendNames.Length);
for (i = 0; i < friendNames.Length; i++)
{
Console.WriteLine(friendNames[i]);
}
Console.ReadKey();
就是写出你朋友的数量和各个名字,你运行一次就知道了.
你的朋友是:"Robert Barwell","Mike Parry","Jeremy Beacock"
数量是friendNames.Length