Ask Question
21 February, 17:31

Case-Based Critical Thinking Questions Case 1: XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first assignment is to review and correct various code so that you can become familiar with the company's programs. You changed the Do clause to the correct For clause in the previous problem. You also changed the Loop keyword to the Next keyword for the For ... Next loop. What else needs to be changed about the Do loop?

+1
Answers (1)
  1. 21 February, 19:35
    0
    The answer is:

    for intCounter As Integer = 1 To 3

    Explanation:

    This is the correct remaining part of the given question. "Your supervisor wants you to change the Do ... Loop in the previous problem to a For ... Next loop. He also wants the message to display only three times. Which of the following For clauses should you use?"

    As in the given question the Do clause is changed to the correct For clause in the previous problem and Loop keyword is changed to the Next keyword for the For ... Next loop.

    Now the next thing to be changed about the Do loop is to display the message only three times using For clause as Do clause is changed to correct For clause. For that purpose the following statement is used to display the message only three times.

    for intCounter As Integer = 1 To 3

    Here the intCounter is used a count and its an integer type variable. 1 to 3 here show that this count variable i. e. intCounter in the for loop will execute three times hence displaying the message three times at each iteration of this for loop.

    So this for loop variable will execute three times and at each iteration the message is displayed once. So at three iterations the message is displayed three times. Hence the correct for loop statement that displays the message three times is for intCounter As Integer = 1 To 3
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Case-Based Critical Thinking Questions Case 1: XYZ Solutions You have just started working for XYZ Solutions as a programmer. Your first ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers