Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "Hi, who are you?"
- input $name
- print "Enter a number, and I'll compare it to 5"
- input a
- if a > 5 then goto bigger
- print "it's not bigger than 5"
- goto fun_with_loops
- bigger:
- print "number you entered is bigger than 5"
- fun_with_loops:
- print "I can count from 1 to any number you want (say, smaller than 10)"
- print "enter the number"
- input number
- if number > 10 then goto fun_with_loops
- for i = 1 to number
- print "See, i count!"
- print i
- next i
- print "Press Enter"
- input $wtf
- print "I can make loops nested, see... i = 1 to 3 and j = 4 to 5"
- for i = 1 to 3
- for j = 4 to 5
- print "And now I and J are..."
- print i
- print j
- next j
- next i
- print "Press Enter"
- input $wtf
- print "And now for something completely different"
- for j = 1 to 10
- print "Now loop counter is"
- print j
- print "you can mess with loops! try enter some new loop counter; 10 to stop"
- input j
- next j
- print "I remember, your name is"
- print $name
- print "Bye!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement