What is an example of a pretest loop?

1 answer

Answer

1177572

2026-07-14 23:36

+ Follow

Well, from my knowledge of pseudocode, a pre-test loop contains the DO WHILE and LOOP functions.

So say you want to pour some milk into your cereal for breakfast:

DO WHILE cereal_bowl.Full = False

Pour_Milk

LOOP

Basically this is you saying, I am going to pour milk WHILE the bowl is not full. Once the bowl is full you will stop because you checked before your poured (a pre-test).

Hope this helps.

- The Doctor

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.