end;
procedure Redakt; begin
clrscr;
reset(f);
while not (eof(f)) do begin
read(f, z); write(z.fam);
gotoxy(15,wherey); write(z.im); gotoxy(27,wherey); write(z.otch); gotoxy(44,wherey); write(z.tseh); gotoxy(49,wherey); write(z.pol); gotoxy(54,wherey); write(z.vozrast); gotoxy(59,wherey); write(z.zarpl:5:2); writeln;
end;
close(f);
reset(f);
writeln('Vvedite nomer zapisi'); readln(n);
if n>filesize(f) then write('Takoj zapisi net') else
begin seek(f,n-1);
writeln('Vvedite dannye ',n, ' rabotnika');
writeln('Vvedite familiju: '); |
readln(z.fam); |
writeln('Vvedite imja : '); |
readln(z.im); |
writeln('Vvedite otchestvo : '); |
readln(z.otch); |
writeln('Vvedite nomer tseha: '); |
readln(z.tseh); |
writeln('Vvedite pol: '); |
readln(z.pol); |
writeln('Vvedite vozrast: '); |
readln(z.vozrast); |
writeln('Vvedite zarplatu: '); |
readln(z.zarpl); |
write(f, z); |
|
write('Zapis izmenena'); |
|
end; |
|
readkey; |
|
close(f); |
|
end; |
|
procedure Poisk; begin
clrscr;
write('Vvedite nomer tsheha: '); readln(n_tseh); s:=0; k:=0; max:=0;
reset(f);
writeln;
while not (eof(f)) do begin
read(f, z);
if n_tseh=z.tseh then k:=k+1
end;
close(f);
reset(f);
if k=0 then write('Takogo tseha net') else
begin
writeln('Spisok rabotnikov ', n_tseh, ' tseha'); while not (eof(f)) do
begin
read(f, z);
if n_tseh=z.tseh then begin
write(z.fam); gotoxy(15,wherey); write(z.im);
gotoxy(27,wherey); write(z.otch); gotoxy(44,wherey); write(z.tseh); gotoxy(49,wherey); write(z.pol); gotoxy(54,wherey); write(z.vozrast); gotoxy(59,wherey); write(z.zarpl:5:2); writeln;
s:=s+z.zarpl;
end;
if (n_tseh=z.tseh) and (max<z.zarpl) then
begin max:=z.zarpl; z_max:=z;
end;
end;
s:=s/k;
writeln;
writeln('Srednja sarplata ',s:4:2); writeln('Maksimalnaja sarplata ',max:4:2); write(z_max.fam);
gotoxy(15,wherey); write(z_max.im); gotoxy(27,wherey); write(z_max.otch); gotoxy(44,wherey); write(z_max.tseh); gotoxy(49,wherey); write(z_max.pol); gotoxy(54,wherey); write(z_max.vozrast); gotoxy(59,wherey); write(z_max.zarpl:5:2); writeln;
end;
readkey;
end;
end.
Список літератури
Основна література
1.Фаронов В. В. Турбо Паскаль 7.0. Учебный курс: Учебное пособие. – М.: Нолидж, 2001. – 576 с.
2.Боровик В.А., Тыркусова Н.В. Программирование: Учебное пособие: В 2 ч. – Сумы: Изд-во СумГУ, 2004. – 4.1. – 106 с.
3.Боровик В.А., Тыркусова Н.В. Программирование: Учебное пособие : В 2 ч. – Сумы: Изд-во СумГУ 2004. – Ч.2. – 111 с.
4.Бабий М.С. Использование файлов в среде Турбо Паскаль. – Сумы:Изд-во СумГУ 1997.
Додаткова література
1.http://vv\vw.programmist.info/pp/pascal/ – Різна інформація для усіх, хто знає мову програмування Pascal; тут можна знайти довідкові посібники.
2.http://mdelphi.far.ru/pascal/ – Повний навчальний курс Turbo Pascal. Цей розділ створений для навчання програмуванню на Паскалі.
3.http://www.knowledge.ru/ – Дискета з модулями і прикладами до книги Фаронова з Турбо Паскаля.
4.http://www.karelia.ru/psu/Chairs/IMO/pascal/ – Навчальний комплекс з мови програмування Паскаль.