Pagini recente » Cod sursa (job #2193997) | Cod sursa (job #1544390) | Cod sursa (job #1300027) | Cod sursa (job #33944) | Cod sursa (job #4166)
Cod sursa(job #4166)
var f1,f2:text; c,c1:char; l,cu,a,a1,x:longint;
begin
assign(f1,'text.in');
reset(f1);
assign(f2,'text.out');
rewrite(f2);
read(f1,c);
c1:=c;
a:=ord(c);
if (a>64)and(a<123) then inc(l);
while not(eof(f1)) do begin
c1:=c;
read(f1,c);
a1:=ord(c1);
a:=ord(c);
if ((a<65)or(a>122))and((a1<123)and(a1>64)) then inc(cu);
if (a>64)and(a<123) then inc(l);
end;
x:=l div cu;
write(f2,x);
close(f1);
close(f2);
end.