Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var t: text;
- s,slovo: string;
- pom,pocet,i: integer;
- begin
- assign(t, 'vstup.txt');
- reset(t);
- pocet:=0;
- while not seekEOF(t) do
- begin
- readln(t, s);
- pom:=0;
- for i:=1 to length(s) do
- inc(pom);
- for i:=1 to length(s) do
- if s[i] in ['a' .. 'z', 'A' .. 'Z'] then
- begin
- if s[i]=s[pom] then inc(pocet)
- else begin
- if s[i+1] in ['a' .. 'z', 'A' .. 'Z'] then s[i+1]:=s[i+1]
- else
- inc(pocet); end;
- end;
- end;
- writeln(pocet);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement