Skip to content

MrTestBud/Simple_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Simple Calculator

A simple calculator that performs the four basic arithmetic operations (Addition, Subtraction, Multiplication, and Division) on two numbers.

Features

  • Addition: Adds two numbers.
  • Subtraction: Subtracts the second number from the first.
  • Multiplication: Multiplies two numbers.
  • Division: Divides the first number by the second, with error handling for division by zero.

Getting Started

Prerequisites

  • A working installation of Java (if using the Java version).
  • Any IDE like IntelliJ IDEA, Eclipse, or command-line tools like javac and java to run the program.

Runing the project

  1. Clone the repository:
  git clone https://github.com/MrTestBud/Simple_calculator
  cd Simple_calculator
  1. Compile and Run (Java example):
  javac simple_calc.java
  java Simple_calculator
  1. Using the Calculator:

The calculator will prompt you to enter two numbers and select an operation (addition, subtraction, multiplication, or division). Based on your input, it will return the result.

Example Usage

Enter first number: 10
Enter second number: 5
Choose operation (+, -, *, /): +
Result: 15

Built with

  • Java – The programming language used for this project.

License

This project is licensed under the MIT License – see the MIT file for details.

About

A simple calculator for two numbers made with java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages