Solution Review: Design a Calculator
In this lesson, you will see the detailed solution review of the challenge given in the previous lesson.
We'll cover the following...
We'll cover the following...
Solution #
Press the RUN button and see the output!
Explanation #
1- add function
The add function takes two values of type double in its input parameters, adds number1 in number2, and returns the result of type double in the output.
2- subtract function
The subtract function takes two values of type double in its input parameters, subtracts the number2 from number1, and returns the result of type double in the output.
3- multiply function
The multiply function takes two values of type double in its input parameters, multiplies the number1 by number2, and returns the result of type double in the output.