For each of the following situations, tell which type of loop (while,
do-while, or for) would work best:
a. Summing a series, such as 1/2 + 1/3 + 1/4 + 1/5 + … + 1/10.
b. Reading in the list of exam scores for one student.
c. Reading in the number of days of sick leave taken by employees in a
department.
d. Testing a function to see how it performs for different values of its
arguments.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here