Question: Input 1 : Choice: 1 ( Addition ) Number 1 : 1 2 Number 2 : 8 Expected Output: Result of addition: 2 0 Question

Input1:
Choice: 1(Addition)
Number 1: 12
Number 2:8
Expected Output:
Result of addition: 20
Question 2(30 points): In c++, Create a menu-driven program with functions for basic arithmetic operations
(addition, subtraction, multiplication, division). The program should allow the user to choose an operation
and enter two numbers. Based on the user's choice, call the appropriate function and display the result.
Ensure to handle division by zero.
Example Output:
Sample Test Case:
Input1:
Choice: 1(Addition)
Number 1: 12
Number 2:8
Expected Output:
Result of addition: 20
Input 1 : Choice: 1 ( Addition ) Number 1 : 1 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!