For each of the following situations, tell which type loop (while, do-while, or for) would be best in that situation:

a) Reading a list of an unknown number of homework grades for a single student.
b) Summing a series such as 1 +1/2 +1/(22) + 1/(23) + … + 1/(28)
c) Testing a newly coded library function to see how it performs for different values of its arguments.
d) Reading in the number of days of vacation taken by an employee.

a) Reading a list of an unknown number of homework grades for a single student.
b) Summing a series such as 1 +1/2 +1/(22) + 1/(23) + … + 1/(28)
c) Testing a newly coded library function to see how it performs for different values of its arguments.
d) Reading in the number of days of vacation taken by an employee.

Computer Science & Information Technology

You might also like to view...

________ dependency occurs when the value of one field is determined by the value of another

Fill in the blank(s) with correct word

Computer Science & Information Technology

In Internet Explorer 11, a URL can be typed into the status bar

Indicate whether the statement is true or false

Computer Science & Information Technology