View Single Post
Old Jun 9th, 2005, 9:32 AM   #8
Knight
Newbie
 
Join Date: Jun 2005
Posts: 28
Rep Power: 0 Knight is on a distinguished road
Quote:
Originally Posted by shangnyun
Working on it. I just don't understand why I'm supposed to use a loop just so the user can enter an integer..
I think they're trying to teach you how to handle invalid input. You don't want your *strong deep voice* huge immensely powerful super program *end strong deep voice* that you worked on for months and cost the company thousands or millions of dollars (heh, millions..right..) to crash because of a simple invalid input (scenario for when you are working for a major corporation or something). Its just a simple check to make sure the input is valid so your program can function correctly later on.
Knight is offline   Reply With Quote