Help with gigantamous switch statement
Hi, I have a question with some code. I am making a simple cheesy little program that changes any int that a user inputs into that numbers binary value. Here is a sample of my code:
Is there any way to make this code easier or should i say shorter to write instead of one gigantamous switch statement? and one last thing, if i asked the user if they wanted to type another int, and they said yes, how would i loop the program?
System.out.print("Type an int from 1 to 99: ");
number = InputOutput.getInt();
case 1: System.out.println("10000000");
case 2: System.out.println("01000000");
case 3: System.out.println("11000000");