%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % hang3.t % Name : joe student % Tutor: joe Lim % Prof: Michelle Craig % Student Number : 000000000 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% const VOWELS : string := "AEIOUaeiou" const CONSONANTS : string := "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz" var original : string put "player 1 please enter a word" get original %original := "yesterday" for testing purposes cls %put "the word was ", original put " _ stands for a consonant" put " = stands for a vowel " put skip put " the word to guess is :" for i : 1 .. length (original) % step through the word one char at a time % each time original(i) is the character we are considering if index(CONSONANTS,original(i)) not= 0 then % found a consonant % put original(i), " is a cons" % then print underscore put "_ " .. elsif index(VOWELS,original(i)) not= 0 then % found a vowel % print an equal sign % put original(i), " is a vowel" put "= ".. else % this one is a special char % just print the character % put original(i), "is a special char" put original(i)," ".. end if end for put skip,"thanks for playing"