help with java code
hey 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?
Yeah you could just use some of the functions built into the API
btw, binary is counted from right to left...
001 = 1
010 = 2
011 = 3
thx all, appreciate the help
|All times are GMT +1. The time now is 02:39 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.