Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Doubles depthMeasured1 and depthMeasured2 are read from input. Perform the following tasks: Output depthMeasured1 with a maximum of seven digits, showing the decimal point

c++

Doubles depthMeasured1 and depthMeasured2 are read from input. Perform the following tasks:

Output depthMeasured1 with a maximum of seven digits, showing the decimal point and any trailing 0s.

Output depthMeasured1, not showing the decimal point and any trailing 0s when the fraction is zero.

Output depthMeasured2 in fixed-point notation with a maximum of four digits in the fraction.

Output depthMeasured2 in scientific notation with a maximum of four digits in the fraction.

End each output with a newline.

Ex: If the input is 52.625 9374318.75, then the output is:

52.62500 52.625 9374318.7500 9.3743e+06 NOTE: cout << showpoint shows the decimal point and any trailing 0s even when the fraction (after the decimal point) is zero. cout << noshowpoint clears the showpoint manipulator.

#include #include using namespace std;

int main() { double depthMeasured1; double depthMeasured2; cin >> depthMeasured1; cin >> depthMeasured2; /* Your code goes here */ return 0; }

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

Discuss communication challenges in a global environment.

Answered: 1 week ago