Skip to content

A simple calculator program that runs on a command line interface

License

Notifications You must be signed in to change notification settings

headdawnLight/cpp-cli-calculator-v2

Repository files navigation

cpp-cli-calculator-v2

This is a simple calculator program that performs various mathematical operations and runs in a command line interface. It was developed on Microsoft Visual Studio 2019 with the C++ programming language.

Introduction

cpp-cli-calculator was able to perform basic arithmetic operations such as addition(+), subtraction(-), multiplication(*) and division(/)).

cpp-cli-calculator-v2 can perform mathematical operations such as exponents and factorials. It can list the prime numbers up to a certain number. It can also roll random backgammon dice by running the random number generator.

In summary, in the previous version we were able to perform:

Arithmetic Operations:

  • Addition
  • Subtraction
  • Multiplication
  • Division

In this new version, we can perform:

  • Calculating arithmetic operations
  • Calculating factorial numbers
  • Calculating exponential numbers
  • Finding a list of prime numbers
  • Rolling a random backgammon dice

Finally, I would like to point out that. I could do this development by updating over the first version, tagging or releasing it. However, instead of changing the simple code structure and detailed README description of the first version, I wanted to open a new repository.

This is an advanced version of the first program I developed while learning the basics of programming. You can access the source code of this program and run and test it in your own development environment.

Technology and tools I used while developing this program:

  • Microsoft Visual Studio 2019
  • C++
  • Git
  • GitHub

Installation

Clone the repository:

$ git clone https://github.com/headdawnLight/cpp-cli-calculator-v2.git

Run and test the source codes in your own development environment.

Usage

Step by step

  1. Enter the number code to perform one of the listed in the menu.

2021-10-31_21-19-56

  1. If you choose the number 1, you can calculate simple arithmetic operations.

2021-11-04_10-46-24

  1. If you choose number 2, you can calculate the factorial of a positive integer.

2021-10-31_21-25-04

  1. If you choose the number 3, you can calculate exponents.

2021-10-31_21-34-11

  1. If you choose the number 4, you can list the prime numbers up to a certain number.

2021-10-31_21-34-43

  1. Finally, if you choose the number 5, the random number generator generates two random numbers from 1 to 6, just like rolling a backgammon dice.

2021-11-04_10-48-43

License

MIT License

Copyright (c) 2021 Sertan Işık

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A simple calculator program that runs on a command line interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages