82.3k views
9 votes
Can someone help me with this trace table - its computer science

Can someone help me with this trace table - its computer science-example-1
User Jon Parise
by
3.8k points

1 Answer

9 votes

TThe while loop keeps going until count is greater than or equal to 10.

count = 0, sum = 0

count = 2, sum =2

count = 4, sum = 6

count = 6, sum = 12

count = 8, sum = 20

count = 10, sum = 30

Now that count is equal to 10, it exits the while loop and the program ends. The values above complete your trace table.

User Weiy
by
3.4k points