Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 793 Bytes

File metadata and controls

35 lines (26 loc) · 793 Bytes

This is a simple calculator program written in Java.
It can add, subtract, multiply, and divide two numbers.
The user can perform calculations multiple times until they choose to exit.


✨ Features

  • Addition of two numbers
  • Subtraction of two numbers
  • Multiplication of two numbers
  • Division of two numbers
  • Continuous calculations (loop until user exits)

🚀 How to Run

  1. Clone this repository:

    git clone https://github.com/<your-username>/calculator.git
  2. Open the folder in your editor (like VS Code).

  3. Compile the program: javac Calculator.java

  4. Run the program:

java Calculator 📸 Sample Output Enter first number: 10 Enter second number: 5 Choose operation (+, -, *, /): * Result: 50

Do you want to continue? (y/n): y