Why is it important to test for invalid input


Problem:

Question- Why is it important to test for invalid input for the initial sentinel value when using while loops? How might you modify the code in the following examples to account for an invalid initial sentinel value? In other words, you would like the condition of the while loop to be tested at least once without input failure, and you would also like to avoid an infinite loop. Would initializing the sentinel variable during its declaration be helpful?

Please do not provide cut and paste answers and please include a source.

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Why is it important to test for invalid input
Reference No:- TGS0892947

Expected delivery within 24 Hours