Im trying to make this code and I want it to end when the absolute value of the difference between two consecutive results does not exceed the defined maximum error limit 10