var number : int %Will take the number of words
var lngth : int % Variable for the length of the word
var value : int % Variable to use in the loop procedure of all the characters
var character1, character2 : string %The words chars
put "How many words would you like to enter?"
get number
var words : array 1 .. number of string
for x : 1 .. number
get words (x)
end for
for i : 1 .. number
lngth := length (words (i))
value := ord (words (i) (1))
if value >= 97 and value <= 122 then
put chr (value - 32) ..
else
put chr (value) ..
end if
for j : 2 .. lngth - 1
put words (i) (j) ..
end for
value := ord (words (i) (*))
if value >= 97 and value <= 122 then
put chr (value - 32)
else
put chr (value)
end if
end for
|