+ 1

Fix my java calculator

https://code.sololearn.com/cPV1bSdhvPTA/?ref=app import java.until.Scanner; class myclass{ public static void main(String []args){ Scanner Robin = new Scanner(System.in); double fnum, snum, answer; System.out.println("Enter the first number"); fnum = Robin.nextDouble(); System.out.println("Enter the second number"); snum = Robin.nextDouble(); answer = fnum + snum; System.out.println ("answer"); } } this is my.

1st Jan 2018, 3:53 PM
Robin
Robin - avatar
7 Answers
+ 1
i fixed util byt wgat you mean wuth answer variable
1st Jan 2018, 3:57 PM
Robin
Robin - avatar
+ 4
Hey, I think you want import java.util not until You also want to print the variable answer and not the string "answer"
1st Jan 2018, 3:55 PM
Tarantino
Tarantino - avatar
+ 3
When you run the program it prints the word answer, right? That is because it is enclosed in double quotation marks, if you remove them, you will see that an actual numerical answer is printed.
1st Jan 2018, 3:59 PM
Tarantino
Tarantino - avatar
+ 3
what errors are you getting may I ask?
1st Jan 2018, 4:04 PM
Tarantino
Tarantino - avatar
+ 3
its fixed topic closed i was only inputing 2.50 and waiting for next dialogue box. but when i wrote 2 values 2.50 3.50 in the first dialogue box my code works.
1st Jan 2018, 4:21 PM
Robin
Robin - avatar
+ 1
done but still getting errors. removed the ""
1st Jan 2018, 4:02 PM
Robin
Robin - avatar