C Tutorial/Statement/Continue — различия между версиями


Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 10:32, 25 мая 2010

The continue statement

continue statement breaks the current iteration.


#include<stdio.h>
main(){
    int i;
    for(i = 0; i < 11; i++){
       if ((i == 4) || (i == 7)) {
          continue;
       }
       printf(" the value of i is %d\n", i);
    }
}
the value of i is 0
      the value of i is 1
      the value of i is 2
      the value of i is 3
      the value of i is 5
      the value of i is 6
      the value of i is 8
      the value of i is 9
      the value of i is 10