30th Aug 2018, 7:09 PM
הראל ברודאי
הראל ברודאי - avatar
3 Answers
31st Aug 2018, 1:16 AM
NimWing Yuan
NimWing Yuan - avatar
+ 2
plaese, look at the java tutorial: chapter Getting User Input you need only one scanner object and then use the correct function on the scanner object look at this tutorial https://www.tutorialspoint.com/java/util/scanner_nextdouble.htm
30th Aug 2018, 7:28 PM
asa22
+ 1
There are so many errors... #1 you can use nextDouble() multple times if you put each input in a new line #2 I don't think you can use operator in variable names like Answer+ you should use AnswerPlus #3 you have not imported anything import java. util. Scanner; import java. lang. Math; #4sqrt don't exist you have to use Math. sqrt() #5 you can't call 2 variables with same name #6 you were using sc. nextDouble(); sc? if you copy codes from people you have to change them a little bit #7 you don't have to instantiate the Scanner class three times. You should be able to use nextDouble multiple times. It's not an error but a correction This should be the correct code https://code.sololearn.com/cLHhP1XAfnUp/?ref=app
30th Aug 2018, 7:42 PM
Daniele Bonomi
Daniele Bonomi - avatar