Pagini recente » Cod sursa (job #502667) | Istoria paginii utilizator/iancumarian96 | Cod sursa (job #1300897) | Monitorul de evaluare | Cod sursa (job #726814)
Cod sursa(job #726814)
var f:text;
cl,cc:longint;
mid:longint;
c:char;
begin
cl:=0;
cc:=0;
assign(f, 'text.in');
reset(f);
while EOF(f) = false do begin
read(f, c);
if (c <> ' ' ) AND (c <> '!') AND (c <> '-') AND (c <> ',') AND (c <> '.') AND (c <> ';') AND (c <> '"') then
cl:=cl+1;
if c = ' ' then
cc:=cc+1;
end;
close(f);
assign(f, 'text.out');
rewrite(f);
cc:=cc+1;
mid:=Trunc(cl/cc);
write(f, mid);
close(f);
end.