home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 December / SOFM_Dec1995.bin / pc / dos / gi / ctutor / breakcon.c < prev    next >
C/C++ Source or Header  |  1995-10-31  |  374b  |  18 lines

  1.                                           /* Chapter 3 - Program 5 */
  2. main()
  3. {
  4. int xx;
  5.  
  6.    for(xx = 5;xx < 15;xx = xx + 1){
  7.       if (xx == 8)
  8.          break;
  9.       printf("In the break loop, xx is now %d\n",xx);
  10.    }
  11.  
  12.    for(xx = 5;xx < 15;xx = xx + 1){
  13.       if (xx == 8)
  14.          continue;
  15.       printf("In the continue loop, xx is now %d\n",xx);
  16.    }
  17. }
  18.