Pagini recente » Cod sursa (job #727875) | Cod sursa (job #966895) | Cod sursa (job #1951357) | Cod sursa (job #2619933) | Cod sursa (job #340387)
Cod sursa(job #340387)
var c:char;
b:boolean;
t:text;
leng,cuv:int64;
function adevarat(c:char):boolean;
begin
adevarat:=((ord(c)>64)and(ord(c)<91))or((ord(c)>96)and(ord(c)<123));
end;
begin
assign(t,'text.in'); reset(t);
b:=true;
while not(eof(t)) do begin
while not(eoln(t)) do begin
read(t,c);
if adevarat(c) then begin
inc(leng);
if b then inc(cuv);
b:=false;
end else b:=true;
end;
readln(t);
end;
close(t);
assign(t,'text.out'); rewrite(t);
if cuv<>0 then writeln(t,(leng div cuv)) else writeln(t,'0');
close(t);
end.