• Log in or sign up for an account here: https://www.sythe.org/login

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
 
Just tested that for you, works totally fine. I'd code the bottom part as one System.out.print, but thats just me :D

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.
 
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.
 
Runescape Gamblingrunescape gambling
Back
Top