Yani Abela wrote:1) I have set the ID as an integer
2) an invalid input has been entered when a negative number or a decimal number is entered
Yani Abela wrote:if the user enters 5.5 as the ID number, the program gives an error that the input is invalid.
Yani Abela wrote:thanks for your reply to be honest I did not understand your reply very well.
Anayonkar Shivalkar wrote:
Campbell Ritchie wrote:Don’t use an if else statement. Use a while loop.
Anayonkar Shivalkar wrote:Oops. I put wrong code
Here is the one:
It’s a standard technique which people have to learn.
Anayonkar Shivalkar wrote: . . .
That was elegant.
This guy is skipping without a rope. At least, that's what this tiny ad said:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton