Pagini recente » Cod sursa (job #804119) | Cod sursa (job #1338981) | Cod sursa (job #1414495) | Cod sursa (job #2649628) | Cod sursa (job #248128)
Cod sursa(job #248128)
type Multime = set of char;
var m,m2:multime;
c:char;
f,g:text;
c1,c2,c3,r:integer;
ok:boolean;
begin
assign(f,'text.in');
reset(f);
m:=['a'..'z']+['A'..'Z'];
m2:=['0'..'9'];
c1:=0;
c2:=1;
ok:=false;
while not eof(f) do
begin
read(f,c);
if c in m then
inc(c1);
if (c=' ') or (c='-') then
begin
inc(c2);
ok:=true;
end;
if (c in ['0'..'9']) and (ok) then
begin
dec(c2);
ok:=false;
end;
end;
Close(f);
assign(g,'text.out');
rewrite(g);
writeln(g,c1 div c2);
Close(g);
end.