Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help Use cin to read floating-point numbers from input as current readings until two readings are read that are both positive and less than

Please help

image text in transcribed

Use cin to read floating-point numbers from input as current readings until two readings are read that are both positive and less than 10.0. Output the two readings in the given range. End each output with a newline. Ex: If the input is 0.01.20.91.4, then the output is: 1.2 0.9 Note: Use fixed and setprecision(1) to set one digit after the decimal point. 2 3 A while loop reads each floating-point number from input in currentCurrent. numSuccesses is initialized with 0 . If the value of currentCurrent is greater than 0.0 and less than 10.0, the floating-point number is output followed by a newline and numSuccesses is incremented. If numSuccesses is equal to 2 , the while loop terminates

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions