Results 1 to 2 of 2
- 03-04-2009, 08:30 PM #1
how do I check the format of user input during a loop?
"Write a program that prompts a user to enter a positive whole number less than 2000.Your program should contain an input validation loop that checks the range and the format of the user's input.If the input is valid, your program should display the hexadecimal representation of the number. If the input is out of range, your program should display the message: "Invalid range. Try again." If the input is the wrong format, your program should display the message: "Invalid number. Try again." The program should loop until the user enters a valid number."I've got an idea--an idea so smart that my head would explode if I even began to know what I'm talking about.
- 03-04-2009, 09:58 PM #2Member
- Join Date
- Mar 2009
- Rep Power
- By soc86 in forum New To JavaReplies: 8Last Post: 01-16-2009, 02:00 AM