Var S:String; i,N:Byte; Begin Writeln('Enter the string:'); Readln(S); N:=0; i:=Length(S); Repeat if S[i]='a' then Inc(N); Dec(i); Until S[i]=' '; Writeln('N = ',N); Readln End.
Яндекс