This is a simple command-line Java program that acts as a basic calculator. It takes two numbers and an operation as input from the user and performs the corresponding calculation.
-
Input Format:
- The program expects three inputs from the user:
- First Number
- Second Number
- Operation (+, -, *, /)
- The program expects three inputs from the user:
-
Running the Program:
- You can run the program in any Java compiler or IDE.
- Here's a link to run the program in the online compiler Basic Calculator Online Compiler.
-
Example:
- User Input:
10 5 +
- Expected Output:
Result: 15.0
- User Input:
-
Error Handling:
- The program handles division by zero error.