Validate user input as an integer and NOT as a decimal or anything else c
So I've looked this up and most of the solutions I've seen only make sure
that it's a number being entered, and then if the user enters a decimal
value, it just drops the fractional value, and keeps the whole number.
Basically I want it to
//ask for integer value
//check for valid integer value
//if anything but an integer value throw an error and loop back to start
No comments:
Post a Comment