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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago

Question

7. What decisions would you make as the city manager?

Answered: 1 week ago

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago