!Takoma Park M.S.
!Jr-5
!Contest 3
!David Kaufman
DO
INPUT PROMPT
"Enter the word. ":word2$
LET word2$ =
Ucase$(word2$)
LET LengthReal =
LEN(word2$)
LET Length = 3 *
LengthReal
FOR counter = 1 to
LengthReal
LET word$ =
word$ & word2$[counter:counter] & " "
NEXT counter
LET word$ = word$
& " "
!1
FOR counter = 1 to
Length
IF
word$[counter * 3 - 2:counter * 3 - 2] & word$[counter * 3 + 1:counter * 3
+ 1] = "AN" THEN
LET word$[counter
* 3 - 2:counter * 3 - 2] = "u"
LET
word$[counter * 3 + 1:counter * 3 + 1] = "n"
END IF
NEXT counter
!2
FOR counter = 1 to
Length
IF
word$[counter * 3 - 2:counter * 3 - 2] & word$[counter * 3 + 1:counter * 3
+ 1] = "AU" THEN
LET
word$[counter * 3 - 2:counter * 3 - 2] = "o"
LET
word$[counter * 3 + 1:counter * 3 + 1] = "o"
END IF
NEXT counter
!3
FOR counter = 1 to
Length - 1
IF
word$[counter * 3 - 2:counter * 3 - 2] = "A" THEN
LET
word$[counter * 3 - 2:counter * 3 - 2] = "e"
END IF
NEXT counter
!4
FOR counter = 1 to
Length
IF
word$[counter * 3 - 2:counter * 3 - 2] & word$[counter * 3 + 1:counter * 3
+ 1] = "OW" THEN
LET
word$[counter * 3 - 2:counter * 3 - 2] = "o"
LET
word$[counter * 3 + 1:counter * 3 + 1] = "o"
END IF
NEXT counter
!5
FOR counter = 1 to
Length
IF
word$[counter * 3 - 2:counter * 3 - 2] = "O" THEN
LET
word$[counter * 3 - 2:counter * 3 - 2] = "u"
END IF
NEXT counter
!6
FOR counter = 2 to
Length
IF
word$[counter * 3 - 2:counter * 3 - 2] = "I" THEN
LET
word$[counter * 3 - 2:counter * 3 - 2] = "e"
LET
word$[counter * 3 - 1:counter * 3 - 1] = "e"
LET counter
= Length
END IF
NEXT counter
!7
IF Length > 5
THEN
IF word$[Length
- 5:Length - 5] & word$[Length - 2:length - 2] = "EN" THEN
LET
word$[Length - 5:Length - 5] = "e"
LET
word$[Length - 2:Length - 2] = "e"
END IF
END IF
!8
IF Length > 2
THEN
IF word$[Length
- 2:length - 2] = "E" THEN
LET
word$[length - 2:length - 2] = "e"
LET
word$[length - 1:length - 1] = "-"
LET
word$[length:length] = "a"
END IF
END IF
!9
IF word$[1:1] =
"E" THEN
LET word$[1:1]
= "i"
END IF
!10
FOR counter = 1 to
Length
IF
word$[counter * 3 - 2:counter * 3 - 2] = "U" THEN
LET
word$[counter * 3 - 2:counter * 3 - 2] = "o"
LET
word$[counter * 3 - 1:counter * 3 - 1] = "o"
END IF
NEXT counter
LET word$ = Ucase$
(word$)
FOR counter = 1 to
Length + 1
IF
word$[counter:counter] <> " " THEN
LET
FinalWord$ = FinalWord$ & word$[counter:counter]
END IF
NEXT counter
PRINT FinalWord$
LET word$ =
""
LET word2$ =
""
LET FinalWord$ =
""
LOOP
END