/terminal-calculator

This is a small example of a terminal calculator that can calculate the four main operations: +, -, * and /

Primary LanguageRust

Rust Calculator

This is a very simple CLI calculator written in Rust just to make me learn it in a simple way. 🐵

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Rust

Run

  • Clone the repository to your local machine
  • Type cargo to install dependecies
  • Now type cargo run to run the program

Usage

Once the binary is running:

Choose the operation you want to perform by typing a number between 1 and 5:

  1. Addition
  2. Subtraction
  3. Multiplication
  4. Division
  5. Exit
  • Enter the first number.
  • Enter the second number.

The calculator will then perform the chosen operation on the two inputted numbers and print out the result. It will also print the every calculation.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.