02/21/00
COM1100 Winter2000 Yuhong Yin
4
Output Array values
n
Output Examples
n
cout << temp[0];
// output the value of the first element
n
n
// the following loop print out all the elements in an array
n
for ( int i = 0 ; i < NUMBER ; i ++ )
n
{
n
cout << “\nEnter a temperature: “ ;
n
cin >>
temp[i];
n
}