Adblock breaks this site

Am I doing these problems right?

Discussion in 'Programming General' started by kmjt, Jan 26, 2011.

  1. kmjt

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449
    Am I doing these problems right?

    Done thanks.
     
  2. Pottworth

    Pottworth Member

    Joined:
    Nov 27, 2005
    Posts:
    83
    Referrals:
    0
    Sythe Gold:
    0
    Am I doing these problems right?

    Just tested that for you, works totally fine. I'd code the bottom part as one System.out.print, but thats just me :D
     
  3. kmjt

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449
    Am I doing these problems right?

    Thanks for testing. And yaa i'm going to change bottom.. it's only like that because I didn't have room to do it on one line when I was making the program (I was writing it on a piece of paper with a pencil aha.) Putting up my second program in a few minutes.
     
  4. Fate1

    Fate1 Apprentice
    Banned

    Joined:
    Apr 21, 2005
    Posts:
    773
    Referrals:
    2
    Sythe Gold:
    5
    Am I doing these problems right?

    For your top program. You are going to want to use the nextDouble() method instead of nextInt(). If you are asking for a double and the program only looks for an int it is going to throw an error when you run it. Also not really sure why you did that but the bottom brackets are the wrong ones.
     
< Detect an image, then clicking on that image? | Keylogger? wat? >


 
 
Adblock breaks this site