Loop structures: Difference between revisions

no edit summary
imported>Maleza
No edit summary
Line 171:
for( i=0; i<9; i++)
cout ` $i\n`;
</syntaxhighlight>
=={{header|Curto}}==
===HACER-BUCLE===
<syntaxhighlight lang="curto">
\ limite inicio HACER elementos iterados BUCLE
\ limite inicio HACER elementos iterados incremento +BUCLE
SALIR \ abandona bucle HACER
DBUCLE SALIR \ limpia contadores de la pila de retorno antes de abandonar la palabra actual
</syntaxhighlight>
 
ejemplo: Dos iteraciones típicas
<syntaxhighlight lang="forth">
10 0 hacer i . bucle \ Imprime números de 0 a 9
10 0 hacer i . 2 +bucle \ Imprime números pares de 0 a 8
</syntaxhighlight>
 
Anonymous user