Consider the algorithm….?

give s the value 0

give k the value 1

repeat the two statements while k < 5:

replace the value of s with s+k

replace the value of k with k+1

print s

that assigns values to the variables s and k.

What final value for s does the algorithm print?

1. 15

2. 10

3. 12

4. 5

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 1QUIZZ.COM - All rights reserved.