Pagini recente » Cod sursa (job #668557) | Cod sursa (job #948405) | Cod sursa (job #590096) | Cod sursa (job #1457775) | Cod sursa (job #223757)
Cod sursa(job #223757)
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='-') 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.