Pagini recente » Cod sursa (job #1795748) | Cod sursa (job #860114) | 321 | Cod sursa (job #2931645) | Cod sursa (job #1538840)
Program text1;
var fi, fo : text;
x,y : char;
k1,K2 : longint;
begin
assign(fi,'text.in'); reset(fi);
assign(fo,'text.out'); rewrite(fo);
k1:=0;
k2:=0;
read(fi,x);
y:=x;
if (x in ['a'..'z']) or (x in ['A'..'Z']) then inc(k1);
while not eof(fi) do begin
read(fi, x);
if (x in ['a'..'z']) or (x in ['A'..'Z']) then inc(k1);
if ((y in ['a'..'z']) or (y in ['A'..'Z'])) and (not(x in ['A'..'Z'])) and (not(x in ['a'..'z'])) then inc(k2);
y:=x;
end;
if (x in ['a'..'z']) or (x in ['A'..'Z']) then inc(k2);
writeln(fo, k1 div k2);
close(fi);
close(fo);
end.