Challenge: Design a Calculator
Explore how to build a calculator in C++ by writing functions that handle addition, subtraction, multiplication, and division. Understand function declarations, parameter passing, and how to return results based on operator input, enhancing your practical coding skills.
We'll cover the following...
We'll cover the following...
Problem statement
The aim of this challenge is to design a calculator that takes operands in its input and performs one of the following operations on them:
- Addition
- Subtraction
- Multiplication
- Division
test function
You have to write a function test that takes two values of type double and one value of type char in its input parameters.
-
number1andnumber2take the values of the operands. -
operatecan take , ...