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.
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q11: The value of count is 0;limit is
Q21: A switch statement must have
A)a default case
B)more
Q22: If the following code fragment is executed
Q23: Write the following do-while statement with
Q24: In the expression (j > 0 &&
Q26: Write a program that reads in and
Q27: Consider the if statement: if(condition)yes_clause;else no_clause;
Under which
Q28: Which of the following determines the operator
Q29: What is the output of the
Q30: Write a program that reads in exactly
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents