Microsoft Small Basic

Program Listing: HFX413
TextWindow.WriteLine("Scrieţi o propoziţie vă rog:")
prop=TextWindow.Read()
prop=Text.ConvertToLowerCase(prop)
litere="abcdefghijlmnoprstuvwxyzşţăîâ"
vocale="aeiouăîâ"
nrv=0
nrc=0
l=Text.GetLength(prop)
For i=1 To l
c=Text.GetSubText(prop,i,1)
If (Text.IsSubText(litere,c)) Then
If (Text.IsSubText(vocale,c)) Then
nrv=nrv+1
Else
nrc=nrc+1
EndIf
EndIf
EndFor
TextWindow.WriteLine("Sunt "+nrv+" vocale şi "+nrc+" consoane.")