admin@kcseforecast.com

+2546102301456

Differentiate between a while loop and repeat until loop

Sunday, 07 August, 2022

  • In a while loop, the condition is tested before the execution of the statement while in  Repeat... Until loop statements are executed at least once before testing the condition
  • In while loop statements are executed until the condition becomes false then the loop is exited while in the Repeat... Until , the loop is exited when the condition is True
  • In the while loop, the loop may be exited without executing any statement while in Repeat...Until , the statement is executed at least once before exiting the loop

  Source of Image: By Martin Vorel - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=113444223

Add comment

Back