Question: Write a program for a basic calculator that performs 3 operations: addition, subtraction, and multiplication of two 1-byte numbers N1 and N2. One of these

Write a program for a basic calculator that performs 3 operations: addition, subtraction, and multiplication of two 1-byte numbers N1 and N2.

One of these operations is performed based on an input op_code as follows: Op_code=1 the program performs addition and stores the result in SUM Op_code=2 the program performs subtraction and stores the result in Diff Op_code=3 the program performs multiplication and stores the result PROD

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 Databases Questions!