home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / ctutor2.zip / ANSWERS / CH06_1.C < prev    next >
Text File  |  1989-11-10  |  661b  |  31 lines

  1. #define START  7
  2. #define END   -5
  3.  
  4. main()
  5. {
  6. int index;
  7.  
  8.    for(index = START;index >= END;index = index - 1)
  9.       printf("The value of the count is now %2d\n",index);
  10. }
  11.  
  12.  
  13.  
  14. /* Result of execution
  15.  
  16. The value of the count is now  7
  17. The value of the count is now  6
  18. The value of the count is now  5
  19. The value of the count is now  4
  20. The value of the count is now  3
  21. The value of the count is now  2
  22. The value of the count is now  1
  23. The value of the count is now  0
  24. The value of the count is now -1
  25. The value of the count is now -2
  26. The value of the count is now -3
  27. The value of the count is now -4
  28. The value of the count is now -5
  29.  
  30. */
  31.