Pagini recente » Cod sursa (job #1151546) | Cod sursa (job #2083876) | Cod sursa (job #2633544) | Cod sursa (job #2904028) | Cod sursa (job #223760)
Cod sursa(job #223760)
Program Textul;
var f:text;
i,j:integer;
c:char;
nl,nc:longint;
nmed:real;
s:string;
begin
nc:=1;
nl:=0;
assign(f, 'text.in');
reset(f);
while not eof(f) do
begin
read(f, c);
if (c=' ') or (c=' ') then nc:=nc+1
else
if (c='!') or (c='?') or (c=':')
or (c='.') or (c=',')
or (c='-') or (c=';')
or (c='"') or (c='{')
or (c='}') or (c='(')
or (c=')') then nl:=nl+0
else nl:=nl+1;
end;
nmed:=(nl/nc);
str(nmed, s);
close(f);
assign(f, 'text.out');
rewrite(f);
write(f, s[2]);
close(f)
end.