Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.5 KB

README.md

File metadata and controls

33 lines (28 loc) · 1.5 KB

Mini Calculator

  • Goal: Develop a mini calculator in C++ that performs various operations such as addition, subtraction, multiplication, and division.
  • Each function should take two parameters and return the result.
  • The main function should prompt the user to input two numbers and to choose an operation.
  • Display a menu of operations for the user to choose from.

Main Program Description

  • Welcome the user to the mini calculator
  • Ask the user to enter two numbers and an operation.
  • If the operation is invalid, the user is forced to enter a valid operation.
  • Based on the operation entered by the user, the program performs the arithmetic.
  • The output is then displayed.

Functions for Various Operations

Add Function

  • Description: This function takes two numbers entered by the user and displays the sum.
  • Input: Two floating point numbers.
  • Output: Displays the sum of the two numbers.

Subtract Function

  • Description: This function takes two numbers entered by the user and displays the difference.
  • Input: Two floating point numbers
  • Output: Displays the difference between the two numbers.

Multiply Function

  • Description: This function takes two numbers entered by the user and displays the product.
  • Input: Two floating point values
  • Output: Displays the product between the two numbers.

Divide Function

  • Description: This function takes two numbers entered by the user and displays the quotient.
  • Input: Two floating point values
  • Output: Displays the quotient between the two numbers.