Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this program. Im trying to use C++ programming language. I want to include my ifstream SimpleCal6.txt and my outFile. CS 317

I need help with this program. Im trying to use C++ programming language.

I want to include my ifstream SimpleCal6.txt and my outFile.

CS 317

Calculator Program

Write a program to input three values, two floats and an operator print out what were read and the resulting evaluation. The operators to handle are +, -, *, / and ^. The floats are one or more digits in length. The last input is sentinel value 0 + 0;

Read a float, char, float for input. cin >> v1 >> opchar >> v2;

Input File: SimpleCal6.txt

Example input:

78.2 + 9.0

Example Output:

78.2 + 9.0 = 87.2

...

These are the data for SimpleCal6.txt

78.2 + 99.0 84.3  5.2 605.24 * 34.72 999.3 / 333.9 1010.10 + 1010.10 -5.5 * -3.8 5.89 * .00 0.04 - 0.09 -32.6 ^ 8.0 5.0 ^ 6.0 7.8234 - 7.8234 0.12 ^ 0.045 567.89 - 345.23

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions