Skip to content

NarwhalPrince/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Calculator in C++

This repository contains a basic command-line calculator program implemented in C++. The calculator supports addition, subtraction, multiplication, and division operations on two numbers.

Features

  • User-friendly menu for selecting an operation
  • Support for four arithmetic operations: addition, subtraction, multiplication, and division
  • Error handling for invalid input
  • Option to perform multiple calculations or exit the program

Getting Started

Prerequisites

To compile and run the program, you need a C++ compiler installed on your system. This program uses C++11 features, so your compiler should support the C++11 standard or later.

Compiling and Running

  1. Clone the repository or download the calc.cpp file.
  2. Open a terminal (command prompt) and navigate to the directory containing the calc.cpp file.
  3. Run the following command to compile the program:

g++ -std=c++11 -o calc calc.cpp

This will create an executable named calc.

  1. Run the resulting executable with the following command:

./calc

On Windows, use calc instead of ./calc.

  1. Follow the on-screen prompts to perform calculations.

License

This project is released under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages