PSeInt Repetir Mientras Que (do-while loop)
Repeats and keeps going while the condition is true; it stops when it turns false. The opposite of Hasta Que.
- Group:
- Structures
- Template
Mientras Que
Opens the editor with this example loaded. Run it step by step and watch the flowchart.
Worked example
A complete algorithm, ready to copy and run.
Algoritmo Example Repetir Leer n Mientras Que n < 0FinAlgoritmoOutput
Keeps asking while the number is negative.
This is what the console shows when the example runs. What the user types is highlighted.
User answer: -5User answer: -1User answer: 4
In a flowchart
This is how it appears in a flowchart, with the same shapes Codoritmo draws.
Template
The general form. Replace what's inside < > with your own data.
Repetir <acciones>Mientras Que <condicion>Examples that use it
Programs from the example library where it appears, from the simplest to the most complete.
Modular Menu
A unit converter with a menu that keeps coming back.
Intermediate
More structures
Codoritmo is an independent, open-source project inspired by PSeInt and compatible with its syntax. It is not affiliated with the PSeInt project. Official PSeInt website.