Hi. I have a final exam on next week. Please help me. If you have some extra tim
ID: 3611380 • Letter: H
Question
Hi. I have a final exam on next week. Please help me. If you have some extra time, could you explain how you did?.Thank you. Question: How many times will the loop in this codes be executed? Dim intQuantitySold As Integer Dim decTax as Decimal intQuantitySold = 1 Do Until intQuantitySold =5 decTax = intQuantitySold *0.07 Me.1stDisplay.Items.Add("TaxAmount: " & decTax.ToString( ) ) intQuantitySold += 1 Loop Hi. I have a final exam on next week. Please help me. If you have some extra time, could you explain how you did?.Thank you. Question: How many times will the loop in this codes be executed? Dim intQuantitySold As Integer Dim decTax as Decimal intQuantitySold = 1 Do Until intQuantitySold =5 decTax = intQuantitySold *0.07 Me.1stDisplay.Items.Add("TaxAmount: " & decTax.ToString( ) ) intQuantitySold += 1 LoopExplanation / Answer
It will happen four times because the condition is Do untilintQuantityySold = 5. In the beginning that variable is is 1 andincremented 1 each time resulting in four executions. On the fifthtry it will = 5 and it will be done. So we have 1 , 2, 3, 4which equals four executions.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.