Calculator-Task-1

Java Calculator - Task 1

This project is a simple command-line calculator written in Java.
It allows users to perform Addition, Subtraction, Multiplication, and Division on two integers repeatedly until they choose to exit.
This task demonstrates basic Java programming concepts like loops, methods, and switch-case statements.



Features


Technologies Used


Code Overview


Program Flow

  1. The program asks for two integer inputs.
  2. Displays a menu of operations.
  3. Performs the selected operation using the respective method.
  4. Loops back to the menu until Exit (5) is chosen.
  5. Prints results in the console.

🧑‍💻 Sample Output

Enter first number: 10
Enter second number: 5

1 addition
2 subtraction
3 multiplication
4 division
5 exit
Enter your choice: 1
Result: 15

Enter your choice: 3
Result: 50

Enter your choice: 4
Result: 2

Enter your choice: 5
Exiting...

Notes


Author