help me to solve the problem with looping "do..while"

example, i have data like this :

Amount Tunjangan PTKP PKP Tax
2933254 0 2025000 908253.5 54495.21
2933254 54495.21 2025000 962748.7 57764.92
2933254 57764.92 2025000 966018.4 57961.11
2933254 57961.11 2025000 966214.6 57972.88
2933254 57972.88 2025000 966226.4 57973.58
2933254 57973.58 2025000 966227.1 57973.62
2933254 57973.62 2025000 966227.1 57973.63
2933254 57973.63 2025000 966227.1 57973.63

Tunjangan = tax from the previous record

PKP= (amount + tunjangan) - PTKP

Tax= PKP * 0.06

so how to use looping “do … while”
until Tunjangan=Tax (example the last row in the table above) and if tunjangan=tax then looping stops.

thank you and sorry for my language

warm regards

edo

While and do/while statements are described in Loops. Nevertheless you may want to use while select and interrupt the loop by break when a condition is met.