var word : string var count:int:=0 loop put " Type a word (end=exit)" get word :* if word = "end" then exit end if count +=1 end loop put count ," words have been typed"