Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. De-bug exercise
  2. The following pseudocode has ONLY ONE error. Find the error, and suggest how to re-write it so that the program displays the correct output. 2.5 points for correctly identifying the error and explaining why; 2.5 points for correctly revising (total of 5 points).
  3. .
  4. // This program is supposed to display every fifth year
  5. // starting with 2015; that is, 2015, 2020, 2025,
  6. // and so on, for 30 years.
  7. start
  8. Declarations
  9. num year
  10. num START_YEAR = 2000
  11. num FACTOR = 4
  12. num END_YEAR = START_YEAR + 30
  13. year = START_YEAR
  14. while year < END_YEAR
  15. output year
  16. year = START_YEAR
  17. endwhile
  18. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement