Pagini recente » Cod sursa (job #544717) | Cod sursa (job #336690) | Cod sursa (job #1414250) | Cod sursa (job #279830) | Cod sursa (job #22407)
Cod sursa(job #22407)
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.