1
0

05-for-while.c 220 B

1234567891011121314151617
  1. #include <stdio.h>
  2. int main() {
  3. for (auto i = 1; i <= 8; i++)
  4. printf("%d ", i);
  5. int j = 8;
  6. while (j > 0)
  7. printf("%d ", j--);
  8. int k = 1;
  9. do {
  10. printf("%d ", k++);
  11. } while (k <= 8);
  12. return 0;
  13. }