using System;
namespace MyApplication {
class MyClass {
static void Main(string[] args) {
// n is an array of 5 integers
int [] a = new int[5];
int i,j;
/* initialize elements of array a */
for ( i = 0; i < 5; i++ ) {
a[ i ] = i + 10;
}
/* output each array element's value */
for (j = 0; j < 5; j++ ) {
Console.WriteLine("Element[{0}] = {1}", j, a[j]);
}
Console.ReadKey();
}
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265880.html