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.