Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Tells how many words were entered once the keyword 'end' has been typed
- %VARIABLES
- var words : int := 1
- var Cword : string
- %Main loop
- loop
- for num : 1 .. words
- put words, ":" ..
- get Cword
- if Cword = "end" then
- put words, " words entered until signal word" %Restart loop when "end" is typed"
- words := 1
- put "----------------------------"
- put " "
- put " "
- delay (500)
- end if
- words += 1 %Reset words count
- exit when Cword = "end" %exit loop when "end" is typed
- end for
- delay (250) %Cleaning up to restart loop
- end loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement