Write a C++ Program that contains four user defined function(s): addition(), subtraction(), division(), multiplication(). Develop a calculator as follows:
• In main() function:
o A menu with choices addition, subtraction, division and multiplication must be displayed.
o Get two numbers and a choice from user
o Call the respective functions with user given number as parameter using switch statement
o Print the result from addition (), subtraction (), division (), multiplication ().
• In user defined functions:
o Plus and minus function get two integer values and return integer.
o Multiply and Divide functions get two integer values and return float.
Answers
Answered by
0
Answer:
In this C++ Program to add subtract divide and multiply two numbers, We define two variables num1 and num2 to store the data entered by the user. Sum, subtraction, multiplication and division are calculated as num1 + num2, num1 – num2, num1 * num2 and num1 / num2 respectively.
Explanation:
Hope you will like my answer.
please mark me as Brainliest.
Similar questions