Quantcast
Channel: PTC Community : All Content - Programming & Extending Mathcad
Viewing all articles
Browse latest Browse all 680

Fast question

$
0
0

Hy.

I have a quick question. A simple algorithm.

I have a condition: a<L*B(that equals 20).

Initial values x=1,y=1, a=x*y.

Iterative function "while".

The result must stop at 16 (when x=4 and y=4; a=x*y=16<20). Well it doesn't. It stops one pace later (x=5, y=5, a=25).

How do I make stop at 16 not at 25?

P.S. I noticed that those initial values x=1,y=1,a=x*y are irrelevant. I removed them and the algorithm wasn't affected.

Thanks.


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>