Answered step by step
Verified Expert Solution
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
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 terminatesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started