Results 1 to 4 of 4
Thread: Adding Any conversion to any
- 06-25-2010, 11:31 AM #1
Member
- Join Date
- Jun 2010
- Posts
- 34
- Rep Power
- 0
Adding Any conversion to any
im starting a program thatJava Code:int base =-2; while(base<2|base>16){ System.out.println("Enter a Base from 2-16 ONLY OR LANG!: "); base = Integer.parseInt(k.next()); if(base<2){ System.out.println("Your Inputted Base is too low please Try again"); }else if(base>16){ System.out.println("Your Inputted Base is too high please Try again"); } } int array[] = new int[2]; for(int num =0 ; num <= array.length ;num++){ if System.out.println("Input Number to be Added 2 times only: "); String number = k.next(); num = Integer.parseInt(number); } } }
will add my selected base like
if i choose binary
it will add those numbers
and if i choose octal or any 2-16 base
it will add those numbers *same base*
my problem now is
the inputting of numbers
something is not right
because if i inputted 12313 it won't ask for a send batch of number.
- 06-25-2010, 12:33 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,588
- Blog Entries
- 7
- Rep Power
- 17
Shouldn't you have posted this in the 'New To Java' forum?
kind regards,
Jos
- 06-25-2010, 01:10 PM #3
Can you show what the code does for that input?if i inputted 12313 it won't ask for a send batch of number
-
Similar Threads
-
XLS to PDF conversion
By nitin2k2k in forum Advanced JavaReplies: 17Last Post: 09-20-2011, 08:41 AM -
int to array conversion
By Yfke in forum New To JavaReplies: 1Last Post: 11-14-2009, 12:48 PM -
Huge VB.Net conversion
By bullstreetboy in forum New To JavaReplies: 3Last Post: 04-09-2009, 01:30 PM -
Doc to Pdf conversion
By praveen.kb in forum Advanced JavaReplies: 2Last Post: 01-16-2009, 12:27 PM -
Conversion from wav to vox
By bozovilla in forum Advanced JavaReplies: 1Last Post: 07-31-2008, 05:54 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks