This seems like the wrong approach to solving your problem. You know when you see the second invalid input, why print out the unwanted message in the first place?
This seems like the wrong approach to solving your problem. You know when you see the second invalid input, why print out the unwanted message in the first place?