In this chapter are: sequences (arrays) of values, enumeration types, weather data, and board games.
Arrays
“If you don’t like the weather in these parts,” the old-timer said with a twinkle in his eye, “wait a few minutes.”
Let’s find out if he’s right. We’ll take ten temperatures at one-minute intervals and see the variation. I’ll start like this:
double temp1; sout << "Enter a temperature: "; sin >> temp1;
double temp2; sout << "Enter a temperature: "; sin >> temp2;
double temp3; sout << "Enter a temperature: "; sin >> temp3;
That’s getting old fast. Maybe there’s a better way to store ten numbers. ...