Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28
  1. #21
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    And?
    Did Norm's solution work?

    Eta: Hay! Where did this page come from?
    :)

  2. #22
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    You have an advertising link...are you spam?

  3. #23
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by Freakzoyd View Post
    It also works for me if I put integers, but if i put 1.2 or any number with decimal in the first number, it will tell me this:

    PHP Code:
    Enter first num: 
    1.2
    Exception in thread "main" java.util.InputMismatchException
    	at java.util.Scanner.throwFor(Unknown Source)
    	at java.util.Scanner.next(Unknown Source)
    	at java.util.Scanner.nextDouble(Unknown Source)
    	at apples.main(apples.java:8)

    i get exactly the same exception when i enter a comma instead of a point. but with the point the calculation is ok

    Enter first num:
    3.5
    Enter second num:
    3.2
    6.7

  4. #24
    Freakzoyd is offline Member
    Join Date
    Jul 2010
    Posts
    27
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    Did Norm's solution work?
    Yeah it does, thx to all.

  5. #25
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    Sorry, that was directed at the other chap saying they had the same problem...:)

    I ought to really use the proper reply button rather than just the Quick Reply!

  6. #26
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Tolls View Post
    You have an advertising link...are you spam?
    Advertising are not allowed in signatures actually. :) Let see.

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

    Default

    Yep, it's spam. Squashed.

  8. #28
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Page 2 of 2 FirstFirst 12

Similar Threads

  1. arrays using doubles [SOLVED]
    By soccer_kid_6 in forum New To Java
    Replies: 0
    Last Post: 03-10-2010, 02:56 AM
  2. GUI's and inputting doubles or ints
    By lopder1 in forum New To Java
    Replies: 19
    Last Post: 11-05-2009, 09:50 PM
  3. Problem with division using doubles
    By chrismanahan in forum New To Java
    Replies: 3
    Last Post: 10-10-2009, 10:26 PM
  4. arrays strings and doubles
    By rgvbabe in forum New To Java
    Replies: 1
    Last Post: 01-14-2008, 12:26 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
  •