1
0

when.c 334 B

12345678910111213141516
  1. // when.c -- when a loop quits
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5. int n = 5;
  6. while (n < 7) // line 7
  7. {
  8. printf("n = %d\n", n);
  9. n++; // line 10
  10. printf("Now n = %d\n", n); // line 11
  11. }
  12. printf("The loop has finished.\n");
  13. return 0;
  14. }