< previous page page_598 next page >

Page 598
0598-01.gif
Figure 11-4
angle Array with Values
or read a value into it
cin >> angle[2];
or write its contents
cout << angle[2];
or pass it as a parameter
y = sqrt(angle[2]);
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
int value[1000];
and execute the following two statements.
value[counter] = 5;
if (value[number+1] % 10 != 0)
    .
    .
    .

 
< previous page page_598 next page >