// Program: ArrayInitializer.ino
// create/declare a new array n and initialize it with
// integer values
int n[10] = {99, 98, 97, 96, 95, 94, 93, 92, 91, 90}; //1
// 0 1 2 3 4 5 6 7 8 9
void setup () {
Serial.begin(115200);
}
void loop () {
for (int j = 0; j < 10; ++j) {
Serial.println(n[j]);
}
Serial.println("---------------------");
// initialize each array element with a value
for (int i = 0; i < 10; ++i) {
n[i] = 3 * i;
}
// print out the value of each array element
for (int j = 0; j < 10; ++j) {
Serial.println(n[j]);
}
while (1);
}