Advertisement
AnotherTest

"Hello, world!" in ?

Dec 29th, 2011
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Create a variable named name.
  2. Display "Enter your name: " and a newline.
  3. Vary the value of name to call function "ask".
  4. Make another variable called age.
  5. Display "Enter your age: " and a newline.
  6. Set the value of age to call function "to number" with call another function "ask".
  7. Display "The name is " and the name.
  8. Show "." plus a newline.
  9. Show "The age is ".
  10. Display the age.
  11. Show "." and another newline.
  12. If the name equals "World" then:
  13. Display "Hello World!" and a newline.
  14. Display another newline.
  15. That's all.
  16. Else, then:
  17. Display "Now this is no longer a 'Hello, world!' program..." and a newline.
  18. That's all.
  19.  
  20. If the age is larger than 100 or the age equals 100 then:
  21. Display "You are very old." and a newline.
  22. Display another newline.
  23. That's all.
  24. Otherwise, then:
  25. Display "You are less than 100 years old." and a newline.
  26. That's it.
  27.  
  28. Show "Bye!" and a newline.
  29. Stop.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement