Even if this problem isn't homework (this is becoming a tired phrase...), you might benefit from tackling this problem yourself.
Split the problem into pieces.
My solution is a little messy, but I'll give you a few hints.
if (condition) { # do something }
In reply to Re: Calculation loop
by BazB
in thread Calculation loop
by harry34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |