Hi mtf,

I put my $x = -1 as you did, and it worked as I wanted. But I don't understand why it must be $x = -1 and I'll tell you why.

For example, every single time the 1.1 gains 0.03, the 1.5 also gains 0.02 and the $x works as a counter and it is added 1.

So if $x = 1 , $a = 1.52 and $b = 1.13.

So when $x = 40, $a = 1.5 + 0.02 * 40 = 2.3 , $b = 1.1 + 0.03 * 40 = 2.3 ⇒ $a = $b

if $a = $b, $a is no longer > $b and the while should NOT be ran again. and the $x should be = 40.

Anyway, if I put $x = -1, I am saying that when $a = 1.52 and $b = 1,13, the x = 0, aren't I? So I thought that the final $x would be 39, but it is 40