You are on page 1of 1

CLARK C.

BELEN
1 BSCS-1

While Loop Assessment

1.
Accumulator/Counter: Output:

n i p s (i <= n)
4 1 0 1 TRUE
2 1 4 TRUE --> The value of s is 16
The value of p is 30
3 5 9 TRUE
4 14 16 TRUE
5 30 FALSE

You might also like