Pagini recente » Cod sursa (job #53862) | Cod sursa (job #1647288) | Cod sursa (job #2868172) | Cod sursa (job #86362) | Cod sursa (job #551095)
Cod sursa(job #551095)
program tttt;
var f : text;
x, y : char;
k, l : integer;
begin
assign (f, 'text.in');
reset (f);
l:=0;
k:=0;
y:=' ';
repeat
read (f, x);
while upcase(x) in ['A'..'Z'] do begin
y:=x;
inc (l);
read (f, x);
end;
if (x in [' ', '-', '.', ',', ':', ';', '!', '?']) and (upcase (y) in ['A'..'Z']) then inc (k);
y:=x;
until eof(f);
close (f);
assign (f, 'text.out');
rewrite (f);
write (f, l div k);
close (f);
end.