Ask Question
2 February, 16:44

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

+5
Answers (1)
  1. 2 February, 19:59
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers