Just keep a record of which letters have been guessed already and check against it. You could do this in different ways but here is one example.
usedLetters as string
guess as string
target as string
target = "hangman"
do
input "Guess a letter:", guess
if (len(usedLetters) > 0)
if (find first char$(usedLetters, guess) > -1)
print "Letter '" + guess + "' already used."
else
usedLetters = usedLetters + guess
if (find first char$(target, guess) > -1)
print "Letter '" + guess + "' is in the target."
else
print "Letter '" + guess + "' is not in the target."
endIf
endIf
else
usedLetters = usedLetters + guess
if (find first char$(target, guess) > -1)
print "Letter '" + guess + "' is in the target."
else
print "Letter '" + guess + "' is not in the target."
endIf
endIf
loop
end
Hopefully that makes sense.

Previously TEH_CODERER.