+ 1

How to create simple calculator in java

14th Oct 2021, 9:48 AM
Rodelyn Baron
4 odpowiedzi
+ 3
Use switch case and put functions like addition, subtraction, multiplication etc...
14th Oct 2021, 10:24 AM
Atul [Inactive]
+ 1
The simplest calculator I know in java is with with help of if statements. Like if choice == addition Add inputs This isn't the most efficient way but it is the simplest. It only requires knowledge of java basics and if statements
15th Oct 2021, 2:39 PM
Bhaveshsingh Pawar
Bhaveshsingh Pawar - avatar
+ 1
Algorithm: 1. Add inputs of 2 numbers 2. Add input of selected operator 3. Make branches for operators (and make second number condition (not equal to zero) for divide and module) 4. Print result. Universal algorithm for imperative programming languages. Requirements: To know programming language basics (what is main function, input/output, variables, data types etc.)
15th Oct 2021, 6:26 PM
UnrealPythonist
UnrealPythonist - avatar
0
Hi rod indi man ko kabalo
14th Oct 2021, 9:57 AM
Kaila Palomata