unit ex_spr;
interface
uses crt;
procedure exchange2;
implementation
var sp,temp:text;
naz,name,pole,str1:string;
i,k,nomst,nompl:byte;
procedure exchange2;
begin
clrscr;
writeln('Vvedite imya spravochnika');
readln(name);
assign(sp,name);
{ASSIGN(temp,'temp.txt');}
reset(sp);{rewrite(temp);}
k:=0;
writeln('Vvedite nomer izmenyaemoi stroki:');
while not eof(sp) do
begin
inc(k);
str(k,str1);
naz:=str1+'. ';
for i:=1 to 5 do
begin
readln(sp,name);
naz:=naz+name+' ';
end;
writeln(naz);NAZ:='';
end;
readln(nomst);
writeln('Vvedite nomer izmenyaemogo polya');
writeln('1-Nazvanie');
writeln('2-Institut');
writeln('3-Specialnost');
writeln('4-God nabora');
writeln('5-Kol-vo studentov v gruppe');
readln(nompl);
writeln('Vvedite novoe znacheniee, vibrannogo poly');
readln(pole);
while not eof(sp) do
begin
inc(k);
IF K<> nomst*5+nompl THEN
{begin }
READLN(SP,NAME)
{writeln(temp,name);
writeln(name);}
{ end }
ELSE
{ begin}
WRITELN(SP,POLE);
{writeln(pole)
end; }
end;
{close(sp);close(temp);
rewrite(sp); reset(temp);
while not eof(temp) do
begin
readln(temp,name);
writeln(sp,name)
end;
close(temp);
{erase(temp); }
close(sp);
WRITELN('Операция завершена. Нажмите Enter для продолжения');
readkey;
end;
end.