Created
March 17, 2015 01:03
-
-
Save clandry94/2ead2c317e5e4e4fccae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while(isRunning) | |
{ | |
int val = input.nextInt(); //menu item select | |
if(val == 1) { | |
val = input.nextInt(); //Get input | |
if(val > 2) | |
{ | |
System.out.println("Bad input!") | |
continue; | |
} | |
//Do other stuff here | |
} | |
if(val == 2) { | |
val = input.nextInt(); //Get input | |
if(val < 1 || val > 3) | |
{ | |
System.out.println("Bad input!") | |
continue; | |
} | |
//Do other stuff here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment