Ask Question
31 August, 06:40

What is the value of count after the last iteration of the outer for loop? Be sure to show your work.

count : =0

For i = 1 to 2

For j=1 to 2

count : =j (count-i)

End-for

End-for

+4
Answers (1)
  1. 31 August, 08:58
    0
    count : = - 16

    Step-by-step explanation:

    Let's compute this step by step

    count starts at 0

    Then i is equal to 1

    Then j = 1

    count : = 1 (0-1) : = - 1

    Now j = 2

    count : = 2 (-1-1) : = - 4

    Now i = 2 and j = 1

    count : = 1 (-4-2) = - 6

    Now j = 2

    count : = 2 (-6-2) = - 16

    End

    End

    So, after the last iteration of the outer for loop, count is equals to - 16.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What is the value of count after the last iteration of the outer for loop? Be sure to show your work. count : =0 For i = 1 to 2 For j=1 to ...” in 📘 Mathematics 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