The program takes 10 numbers of type float, which are entered by the user, and outputs the average ( also of type float ) of those 10 numbers. If I am going to test a range of values for those ten number, am I correct to test the highest values at 3.7E+38 / 10. If each number entered by the user is 3.7E+38 / 10, then the average of those ten numbers should never exceed 3.7E+38 correct?

I'm basically trying to find the upper and lower ranges for my test inputs.

P.S. All numbers input are positive.

FWD

Recommended Answers

All 2 Replies

>>If each number entered by the user is 3.7E+38 / 10, then the average of those ten numbers should never exceed 3.7E+38 correct?

Yes, it is correct. Could you elaborate a little more? What problem are you facing?

>>If each number entered by the user is 3.7E+38 / 10, then the average of those ten numbers should never exceed 3.7E+38 correct?

Yes, it is correct. Could you elaborate a little more? What problem are you facing?

I am trying to find the upper range of numbers to use for testing the programs input from the user.

The maximum value of a float variable is 3.7E+10. I'm using type float for the variables ( actually an array ) that hold the values entered by the user ( 10 numbers ), and those numbers are summed and placed in another variable of type float. Am I correct to assume that the maximum value I should test the values entered by the user is 3.7E+38 / 10 ?

FWD

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.