do-while loop
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Esegue un ciclo.
Original:
Executes a loop.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Usato in cui il codice deve essere eseguito più volte, mentre una certa condizione è presente. il codice viene eseguito almeno una volta.
Original:
Used where code needs to be executed several times while some condition is present. the code is executed at least once.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica] Sintassi
do loop_statement while ( cond_expression )
|
|||||||||
[modifica] Spiegazione
cond_expression deve essere un'espressione, il cui risultato è convertibile in bool. E 'valutata dopo ogni esecuzione di loop_statement. Il ciclo continua l'esecuzione solo se la cond_expression restituisce true.
Original:
cond_expression shall be an expression, whose result is convertible to bool. It is evaluated after each execution of loop_statement. The loop continues execution only if the cond_expression evaluates to true.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Se l'esecuzione del ciclo deve essere terminato ad un certo punto, <div class="t-tr-text"> Istruzione break
può essere utilizzato come terminale dichiarazione. Original:
break statement
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
If the execution of the loop needs to be terminated at some point,
Istruzione break</div> can be used as terminating statement.
Original:
break statement
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Se l'esecuzione del ciclo deve essere continuata alla fine del corpo del ciclo, <div class="t-tr-text"> Istruzione continue
può essere utilizzato come collegamento.Original:
continue statement
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
If the execution of the loop needs to be continued at the end of the loop body,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Parole chiave
[modifica] Esempio
Output:
10 21 4 6 8 10