Pagini recente » Cod sursa (job #1781968) | Cod sursa (job #1706456) | Cod sursa (job #2752810) | Cod sursa (job #499752) | Cod sursa (job #22400)
Cod sursa(job #22400)
const litere=['A'..'Z'];
var c1,c2:char;
i,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 then inc(l);
if (upcase(c1) in litere)and (not(upcase(c2) in litere)) then inc(c);
c2:=c1;
end;
if (not(upcase(c1) in litere)) then inc(c);
if c=0 then writeln(c)
else writeln(l div c);
//close(input);close(output);
end.