Pagini recente » Cod sursa (job #2669288) | Cod sursa (job #2153705) | Cod sursa (job #2767474) | Cod sursa (job #2398734) | Cod sursa (job #22408)
Cod sursa(job #22408)
const litere=['A'..'Z'];
var c1,c2:char;
l,c:byte;
begin
assign(input,'text.in');reset(input);
assign(output,'text.out');rewrite(output);
l:=0;c:=0;
while not eoln do begin
read(c1);
if (upcase(c1) in litere)and(ord(c1)-47<9+1)and(ord(c1)-47>0-1) then inc(l);
if (upcase(c1) in litere)and (not(upcase(c2) in litere)) then inc(c);
c2:=c1;
end;
if (upcase(c1) in litere)and (not(upcase(c2) in litere)) then inc(c);
if l=0 then writeln(l)
else writeln(l div c);
close(input);close(output);
end.