1
0

while1.c 266 B

1234567891011121314
  1. /* while1.c -- watch your braces */
  2. /* bad coding creates an infinite loop */
  3. #include <stdio.h>
  4. int main(void)
  5. {
  6. int n = 0;
  7. while (n < 3)
  8. printf("n is %d\n", n);
  9. n++;
  10. printf("That's all this program does\n");
  11. return 0;
  12. }