Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. int main()
  5. {
  6. int x, y;
  7. x = 0;
  8. y = -4;
  9.  
  10. printf("Counting from 1 up to 10: \n ");
  11. do
  12. {
  13. x = x + 1;
  14. printf(" %d", x);
  15. } while (x < 10);
  16.  
  17. printf("\nCounting from -5 down to -15:\n");
  18. do
  19. {
  20. y = y - 1;
  21. printf(" %d", y);
  22. } while (y > -15);
  23. _getch();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement