Ask Question
1 November, 00:23

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

+1
Answers (1)
  1. 1 November, 00:43
    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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers