Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. new string = ""
  2. index starting at 0, to keep track of word position
  3. for every character:
  4. if the character is a vowel:
  5. if its the first character in the word:
  6. new string += character
  7. move the index up by 1
  8. otherwise:
  9. newstring += empty string
  10. move the index up by 1
  11. if the character is a space:
  12. new string += character
  13. we're about to hit a new word; reset the index to 0
  14. otherwise, it's a consonant:
  15. new string += character
  16. move the index up by 1
  17. return the new string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement