Pagini recente » Cod sursa (job #1254772) | Cod sursa (job #226880) | Cod sursa (job #197963) | Cod sursa (job #2434040) | Cod sursa (job #366449)
Cod sursa(job #366449)
var nr1,nr2:longint;
f,g:text;
c,t:char;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
while not eof(f) do begin
read(f,c);
t:=c;
while upcase(c) in ['A'..'Z'] do begin
inc(nr1);
t:=c;
read(f,c);
end;
if (nr1>0) and (not (upcase(c) in ['A'..'Z'])) and (upcase(t) in ['A'..'Z']) then
inc(nr2);
end;
writeln(g,nr1 div nr2);
close(g);
end.
var nr1,nr2:longint;
f,g:text;
c,t:char;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
while not eof(f) do begin
read(f,c);
t:=c;
while upcase(c) in ['A'..'Z'] do begin
inc(nr1);
t:=c;
read(f,c);
end;
if (nr1>0) and (not (upcase(c) in ['A'..'Z'])) and (upcase(t) in ['A'..'Z']) then
inc(nr2);
end;
writeln(g,nr1 div nr2);
close(g);
end.