+ 1

How to make a program in java in which you can input 3 variables/3 numbers and input all the operations that'll serve as calcu?

Input 3 numbers on the output example: Enter 1st no. (type any no. e.g) 5 Enter 2nd no. (type any no. e.g) 5 Enter 3rd no. (type any no. e.g) 5 The sum of the 3 no. is (the program will automatically solve it) 15 Addition, Subtraction, Multiplication and Division must be on the same program. All the operations must be on one program. Like a CALCULATOR. What would be the Input/codes for that? Please help me. For educational purpose only. I really need to know how. Please share your knowledge to me. Thank you

1st Jul 2017, 12:58 PM
Michael Gilbert Acuña
Michael Gilbert Acuña - avatar
2 Respostas
+ 3
java uses Scanner class to get input from user but you must import it import java.util.Scanner; Scanner s = new Scanner(System.in);
1st Jul 2017, 1:21 PM
Hetbo.net
Hetbo.net - avatar
1st Jul 2017, 1:23 PM
Hetbo.net
Hetbo.net - avatar