function capital (word : string) : int var count : int := 0 for i : 1 .. length (word) if word (i) > "A" and word (i) < "Z" then count += 1 end if end for result count end capital var word : string:="TEST" put capital (word)