Usebreak.c
上传用户:dq031136
上传日期:2022-08-08
资源大小:802k
文件大小:0k
源码类别:

VC书籍

开发平台:

C++ Builder

  1. #include <stdio.h>
  2. void main(void)
  3.  {
  4.    int counter;
  5.    for (counter = 1; counter <= 100; counter++)
  6.     {
  7.       if (counter == 50)
  8.         break;
  9.       printf("%d ", counter);
  10.     }
  11.    printf("nNext loopn");
  12.    for (counter = 100; counter >= 1; counter--)
  13.     {
  14.       if (counter == 50)
  15.         break;
  16.       printf("%d ", counter);
  17.     }
  18.  }   
  19.