Pagini recente » Cod sursa (job #1058117) | Cod sursa (job #32964) | Cod sursa (job #2956232) | Cod sursa (job #2923897) | Cod sursa (job #16869)
Cod sursa(job #16869)
var f,g:text;
n,m,a,b,c,d,xx:longint;
x:char;
ex:boolean;
begin
a:=ord('a')-1;
b:=ord('z')+1;
c:=ord('A')-1;
d:=ord('Z')+1;
assign(f,'text.in');
reset(f);
ex:=false;
while not eof(f) do begin
read(f,x);
xx:=ord(x);
if ((xx>a)and(xx<b))or((xx>c)and(xx<d)) then if ex then n:=n+1
else begin
ex:=true;
n:=n+1;
m:=m+1;
end
else ex:=false;
end;
assign(g,'text.out');
rewrite(g);
write(g,n div m);
close(g);
end.