Garrett M.

asked • 09/10/19

How am I supposed to show the predicate as true?

Given a while loop and a predicate. Show that if the predicate is true before entry to the loop, then it is also true after exit from the loop.

predicate: m^3 > n^2 while (m ≥ 0 and m ≤ 100) do

m := 3 · m

n := 5 · n

end while


I tried to plug the m and n values into the predicate, but just got 27m^3>25n^2.

1 Expert Answer

By:

Patrick B. answered • 09/11/19

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.