string[] name = new string[] { "景珍", "林惠洋", "成蓉", "洪南昌", "龙玉民", "单江开", "田武山", "王三明" };
int[] score = new int[] { 90, 65, 88, 70, 46, 81, 100, 68 };
int sum=0,avg;
for (int i = 0; i < score.Length; i++)
int[] score = new int[] { 90, 65, 88, 70, 46, 81, 100, 68 };
int sum=0,avg;
for (int i = 0; i < score.Length; i++)
int[] age =new int[4] ;//声明并初始化长度为4的整形数组
//为数组元素赋值
age[0] = 18;
age[1] = 20;
age[2] = 23;
age[3] = 17;
Console.WriteLine("四名同学的年龄是:{0}、{1}、{2}、{3}",age[0],age[1],age[2],age[3]);
//为数组元素赋值
age[0] = 18;
age[1] = 20;
age[2] = 23;
age[3] = 17;
Console.WriteLine("四名同学的年龄是:{0}、{1}、{2}、{3}",age[0],age[1],age[2],age[3]);
2016-03-03