Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 4 pts ) : Write a source file named M 0 1 . cpp that takes an operation followed by two operands and outputs

(4 pts): Write a source file named M01.cpp that takes an operation followed by two operands and outputs the result. For example:
+1003.14
=103.14
*45
=20
-410
=-6
/42
=2
Read the operation into a string and use an if-statement to figure out which operation the user wants
eg if (operation=="+")... else if(...)
Read the operands into variables of type double
Do not allow the user to divide by zero.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions