Question: Write a C + + program that does the following: * 1 - Declare two double variables num 1 and num 2 * 2 -
Write a C program that does the following:
Declare two double variables num and num
declare a character variable op to contain the characters or
Ask the user for an expression in the form A number followed by
the operationcharacter followed by another number.
If the input was then num will be op num
if the charater us then perform an addition and display the result
else if the charater us then perform a subtraction and display the result
ad so on for and
if the character is none of the above then display the message "Invalid operation".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
