>cout << "loop.\n"; does this play any role or its just an output -> "n"
I assume you mean \n. It's an escape character that tells cout to print a newline.
>Why did we have to equal the min and max to number...? Which is 0?
min and max denote the smallest and largest value encountered, respectively. Because at this point the only value encountered was number, both min and max must be that value.
>Are max and min are reserved word for C++.
Yes and no. The rules are a bit tricky, but in this case there's no problem.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004