Pagini recente » Cod sursa (job #1804918) | Cod sursa (job #2573510) | Cod sursa (job #1678811) | Cod sursa (job #2552750) | Cod sursa (job #57012)
Cod sursa(job #57012)
program p1;
var f,g:text;
c1,c2:char;
nrcuv,lungcuv:Longint;
meda:Longint;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
nrcuv:=0;
lungcuv:=0;
c2:='}';
while not eof(f) do
begin
read(f,c1);
if ((c1>='a') and (c1<='z')) or ((c1>='A') and (c2<='Z')) then
if ((c2>='a') and (c2<='z')) or ((c2>='A') and (c2<='Z')) then lungcuv:=lungcuv+1
else begin nrcuv:=nrcuv+1; lungcuv:=lungcuv+1; end;
c2:=c1;
end;
meda:=lungcuv div nrcuv;
writeln(g,meda);
end.