Pagini recente » Cod sursa (job #499751) | Cod sursa (job #2182792) | Cod sursa (job #215412) | Cod sursa (job #1289825) | Cod sursa (job #487)
Cod sursa(job #487)
program p1;
var n,i,j,k:qword;
c:char;
f:text;
begin
assign(f,'text.in');
reset(f);
n:=0;
j:=0;
k:=1;
repeat
if eoln(f) then readln(f);
read(f,c);
i:=ord(upcase(c));
if (i<65)or(i>90) then k:=0
else begin
n:=n+1;
if k=0 then begin
j:=j+1;
k:=1;
end;
end;
until eof(f);
close(f);
assign(f,'text.out');
rewrite(f);
write(f,n div j);
close(f);
end.