Results 1 to 4 of 4
  1. #1
    Syfer is offline Member
    Join Date
    Jun 2010
    Posts
    34
    Rep Power
    0

    Default Adding Any conversion to any

    Java 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);
    
    
             }
    }
    }
    im starting a program that
    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.

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default

    Shouldn't you have posted this in the 'New To Java' forum?

    kind regards,

    Jos

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,415
    Rep Power
    25

    Default

    if i inputted 12313 it won't ask for a send batch of number
    Can you show what the code does for that input?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by JosAH View Post
    Shouldn't you have posted this in the 'New To Java' forum?
    Indeed. Moved.

Similar Threads

  1. XLS to PDF conversion
    By nitin2k2k in forum Advanced Java
    Replies: 18
    Last Post: 07-02-2013, 11:17 AM
  2. int to array conversion
    By Yfke in forum New To Java
    Replies: 1
    Last Post: 11-14-2009, 12:48 PM
  3. Huge VB.Net conversion
    By bullstreetboy in forum New To Java
    Replies: 3
    Last Post: 04-09-2009, 01:30 PM
  4. Doc to Pdf conversion
    By praveen.kb in forum Advanced Java
    Replies: 2
    Last Post: 01-16-2009, 12:27 PM
  5. Conversion from wav to vox
    By bozovilla in forum Advanced Java
    Replies: 1
    Last Post: 07-31-2008, 05:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •