Question: Write a for loop that iterates six times to find the maximum value in a list of six floating - point values. Within the loop:

Write a for loop that iterates six times to find the maximum value in a list of six floating-point values. Within the loop:
Read a floating-point value from input into variable inValue.
The first value assigned to inValue is the largest floating-point value read by default, since no other values have been read
yet. Thus, if the current iteration is the first iteration, assign maxVal with inValue.
Otherwise, if inValue is greater than maxVal, assign maxVal with the value of inValue.
Click here for example
Note: All floating-point values are of type double.
#include
Write a for loop that iterates six times to find

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!