Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started