donmike25

ecp1016 tutorial 4(2)

Jun 28th, 2013
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.15 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  
  6. int x=10;
  7.  
  8. while (x>4)
  9. {
  10.     printf("%d",x);
  11. x=x-2;
  12. }
  13. printf("%d",x);
  14.  
  15. return 0;
  16. }
  17.  
  18. // answer: 10,8,6,4
Advertisement
Add Comment
Please, Sign In to add comment