This is in my math class, but I'm horrible at programming so don't quite get it. But, for a, b and c below, I have to find "b" (all values- note that b is an integer) that'll make the algorithm print "Hello".

NOTE: the ....... below is in place of the indentation.. wouldn't let me indent it so I used .'s to make the space.

a.)

k := b

While k < 5

........k := 2k - 1

End While

Print "Hello"

b.) Note for this one =! means not equal

k := b

While k =! 5

........k := 2k - 1

End While

Print "Hello"

c.)

k := b

While k < 5

........k := 2k + 1

End While

Print "Hello"

My teacher said another way to ask the question of finding b that'd make it print "Hello" is to find all values of b which will NOT result in an infinite loop.