Help with For/If statements
Hi,
I am trying to replicate a programming block that my professor sent me to implement into a larger mathcad sheet/program. However, I'm getting a bit lost on the formatting of it. The screencap of the correct block is shown below.

And then there's my attempt at it so far. I'm mostly confused about the value the if statement falls back on to if the following statements fail.

Any help would be appreciated! I'm used to just using MathCad for "cheat" sheet style calculations, so I'm lost on the programming logic of the language.

