Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. ---------------------
  2. For this question I set the holiday to 5 days (1working week Monday to Friday)
  3.  
  4. Set the initial count to 5
  5. While (not (count is 0))
  6.  
  7. Eat breakfast
  8. If (it is sunny)
  9. Go to the beach
  10. Else
  11. Go to the swimming pool
  12.  
  13. Reduce count by 1
  14. Go home
  15. -------------------------------
  16.  
  17.  
  18. <html>
  19. <body>
  20.  
  21. <script type="text/javascript">
  22. var count;
  23. var r=Math.random();
  24.  
  25. count ="5";
  26. while (count>0)
  27. {
  28. document.write("today i woke up on day and had brekkie");
  29. document.write("<br />");
  30. document.write("the count is" + count);
  31. document.write("<br />");
  32. count--
  33. }
  34. document.write("go home");
  35. </script>
  36.  
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement