|
|
|
|
|
|
|
Figure 11-4 angle Array with Values |
|
|
|
|
|
|
|
|
or pass it as a parameter |
|
|
|
|
|
|
|
|
or use it in an arithmetic expression. |
|
|
|
|
|
|
|
|
x = 6.8 * angle[2] + 7.5; |
|
|
|
|
|
|
|
|
Let's look at index expressions that are more complicated than constants. Suppose we declare a 1000-element array of int values with the statement |
|
|
|
|
|
|
|
|
and execute the following two statements. |
|
|
|
|
|
|
|
|
value[counter] = 5;
if (value[number+1] % 10 != 0)
.
.
. |
|
|
|
|
|