Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in C++ I hate that it looks so easy but I'm over here struggling please help Write a program that reads in two

This is in C++ I hate that it looks so easy but I'm over here struggling please help

image text in transcribed Write a program that reads in two floating-point numbers from the file and prints the sum, product and difference in the exact format shown in the example output below. - The inputted numbers should be entered on the same line in which they are asked for. - Do not print spaces to adjust the output, use width() or setw(). - The text (such as "The sum is") is in a field that is 20 characters wide. - The numbers are printed in a field that is 12 characters wide. The first set of answers should always be in fixed-point notation. - The second set of answers should always be in scientific notation. Don't forget the period at the end of each line Example Output: \begin{tabular}{ll} \hline Read the first number: & 15.625 \\ Read the second number: & 98.6 \\ The sum is & 114.225. \\ The product is & 1540.625. \\ The difference is & -82.975. \\ & \\ Here is the same data in scientific notation: \\ The sum is & 1.142e+002. \\ The product is & 1.541e+003. \\ The difference is & 8.297e+001. \end{tabular}

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_2

Step: 3

blur-text-image_3

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

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions