What should I do with invalid input?

faq
invalid-input

#1

What should be my approach towards invalid input.


#2

There will not be invalid input. If a program says a number will be between 0 and 100, it will be between 0 and 100. There is no need to write if (number>=0 && number<=100), or do anything in other cases.