Dreadnought @ Thu Feb 23, 2012 12:56 pm wrote:
What have you tried? What do you consider whitespace?
if you read my problem it says i cant remove spaces. ive used this code but it outputs the letters on different lines if the word has spaces. e.g "h e y" outputs
h
e
y
Turing: |
var word : string
var newword : string := ""
procedure remove_spaces (user_word : string)
newword := ""
for x : 1 .. length (word )
if index (" ", word (x )) = 0 then
newword + = word (x ) + ""
end if
end for
put newword
end remove_spaces
loop
get word
remove_spaces (word )
end loop
|