What should you do to make sure that the loop is executed exactly five times?

You are developing a C# program that needs to perform 5 iterations. You write the following code:

When you run the program, you notice that the loop does not iterate five times. What should you do to make sure that the loop is executed exactly five times?
A. Change the code in line 01 to
int count = 1;
B. Change the code in line 02 to:
while (count == 5)
C. Change the code in line 02 to
while (count >= 5)
D. Change the code in line 05 to
++count;

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.