Pagini recente » Cod sursa (job #1925666) | Cod sursa (job #484207) | Cod sursa (job #1614319) | Cod sursa (job #263909) | Cod sursa (job #545421)
Cod sursa(job #545421)
program textinfo;
var t :string;
var s1,s2,c :longint;
var f,ff :text;
begin
assign(f,'text.in');
reset(f);
readln(f,t);
close(f);
for c:=1 to length(t) do
begin
if (t[c] in ['a'..'z']) or (t[c] in ['A'..'Z']) then
s1:=s1+1;
if ((t[c] in ['a'..'z'])) and ((t[c+1] in ['a'..'z'])=false) and ((t[c+1] in ['A'..'Z'])=false) or ((t[c] in ['A'..'Z'])) and ((t[c+1] in ['A'..'Z'])=false) and ((t[c+1] in ['a'..'z'])=false) then
s2:=s2+1;
end;
assign(ff,'text.out');
rewrite(ff);
write(ff,s1 div s2);
close(ff)
end.