Git Product home page Git Product logo

math_calculator's Introduction

๐Ÿš€ Math Calculator Project

Welcome to my awesome calculator project! This C++ program can take a mathematical expression as a string and calculate the result. It supports the basic arithmetic operations (, +, -, *, /, )

The project is being compiled using Makefile with means that you need a Unix system to run it (MacOS, Linux, WSL).

And supports the order of operations.

๐Ÿ’ป Beginner's Journey

This project represents the knowledge I've acquired so far in my journey of learning C++.

โœจ Features

  • Perform arithmetic operations (, +, -, *, /, )
  • Handle complex expressions with parentheses.
  • Easy-to-use interface that support the regular way of writing mathematical expressions.
  • Written in C++ for efficiency and performance.
  • The project uses only the standard library so if you have a Compiler, you already set.

๐Ÿš€ Getting Started

To use this calculator in your project, follow these simple steps:

  1. Clone this repository to your local machine:

    git clone https://github.com/YanivZalach/Math_Calculator.git ~/Documents/calculate
  2. Compile the C++ source code using Makefile:

    make all
  3. Run the program:

    ./calculator
  4. Add to .bashrc:

    alias calc="$HOME/Documents/calculate/calculator"

    Now you can run the calculator from everywhere using:

    calc

๐Ÿ“ Usage

You can use the calculator by providing a mathematical expression. For example:

$ calc
Math exasperation: (5 + 3) * 2 / (7 - 2)
>> 3.2

Here are some examples to try:

  • 2 + 3
  • (5 - 2) * 4 / 2
  • 10 / (2 + 3)

๐ŸŒŸPay Attention

You can't write decimal numbers by using the . operator, instead use the / operator.

0.8 = (8/10)

๐Ÿ“„ License

This project is licensed under the MIT License.

math_calculator's People

Contributors

yanivzalach avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.