uses crt;
type
kayit=record
no:integer;
ad:string[10];
soyad:string[10];
y1:integer;
y2:integer;
s1:integer;
s2:integer;
ort:real;
f:char;
end;
var
ara1:integer;
s:integer;
dosya:file of kayit;
tus:char;
kay:kayit;
kod,i:integer;
procedure menu; forward;
procedure kayt;
begin
assign(Dosya,'d:\僭RENCI.DAT');
{$i-} reset(dosya); kod:=ioresult; {$i+}
if kod<>0 then rewrite(dosya);
repeat
clrscr;
gotoxy(20,18);write('ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヒヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ');
gotoxy(20,19);write('コNo..............:コ コ');
gotoxy(20,20);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,21);write('コIsim............:コ コ');
gotoxy(20,22);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,23);write('コSoyad...........:コ コ');
gotoxy(20,24);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,25);write('コ1. Yazili.......:コ コ');
gotoxy(20,26);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,27);write('コ2. Yazili.......:コ コ');
gotoxy(20,28);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,29);write('コ1. S配l・.......:コ コ');
gotoxy(20,30);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,31);write('コ2. S配l・.......:コ コ');
gotoxy(20,32);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘハヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,33);write('コ コ');
gotoxy(20,34);write('ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ');
gotoxy(39,19);readln(kay.no);
gotoxy(39,21);readln(kay.ad);
gotoxy(39,23);readln(kay.soyad);
gotoxy(39,25);readln(kay.y1);
gotoxy(39,27);readln(kay.y2);
gotoxy(39,29);readln(kay.s1);
gotoxy(39,31);readln(kay.s2);
kay.ort:=(kay.y1+kay.y2+kay.s1+kay.s2)/4;
gotoxy(21,33);write('Bilgi dosyaya yazilsin mi?[E/H].....:');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then
begin
kay.f:='*';
seek(dosya,filesize(dosya));
write(dosya,kay);
end;
gotoxy(21,33);write('Devam edilsin mi?[E/H].....: ');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then exit;
until tus='H';
close(dosya);
end;
procedure liste;
begin
clrscr;
assign(dosya,'d:\僭RENCI.DAT');
{$i-} reset(dosya); kod:=ioresult; {$i+}
if kod<>0 then
begin
writeln('Dosya Yok...');
tus:=readkey;
exit;
end;
clrscr;
s:=2;
gotoxy(1,1);write('NO');
gotoxy(5,1);write('ADI');
gotoxy(20,1);write('SOYADI');
gotoxy(35,1);write('Y1');
gotoxy(44,1);write('Y2');
gotoxy(50,1);write('S1');
gotoxy(61,1);write('S2');
gotoxy(70,1);write('ORTALAMA');
writeln;
write('-------------------------------------------------------------------------------');
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if kay.f='*' then
begin
inc(s);
kay.ort:=(kay.y1+kay.y2+kay.s1+kay.s2)/4;
gotoxy(1,s);write(kay.no);
gotoxy(5,s);write(kay.ad);
gotoxy(20,s);write(kay.soyad);
gotoxy(35,s);write(kay.y1);
gotoxy(44,s);write(kay.y2);
gotoxy(50,s);write(kay.s1);
gotoxy(61,s);write(kay.s2);
gotoxy(70,s);write(kay.ort:2:2);
end;
if (s>35) then
begin
gotoxy(25,25);write('Diger sayfa i㌍n bir tusa basin...');
tus:=readkey;
s:=0;
clrscr;
end;
end;
gotoxy(25,40);write('Listelenecek kayitlar bitti...');
readln;
clrscr;
close(dosya);
end;
procedure ara;
begin
clrscr;
assign(dosya,'d:\僭RENCI.DAT');
{$i-} reset(dosya); kod:=ioresult;{$i+}
if kod<>0 then
begin
writeln('Dosya Yok...');
tus:=readkey;
exit;
end;
write('Aradiginiz kisi nosu...?:');readln(ara1);
if ara1=0 then exit;
clrscr;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (kay.f='*') and (kay.no=ara1) then
begin
gotoxy(20,18);write('ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヒヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ');
gotoxy(20,19);write('コNo..............:コ コ');
gotoxy(20,20);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,21);write('コIsim............:コ コ');
gotoxy(20,22);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,23);write('コSoyad...........:コ コ');
gotoxy(20,24);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,25);write('コ1. Yazili.......:コ コ');
gotoxy(20,26);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,27);write('コ2. Yazili.......:コ コ');
gotoxy(20,28);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,29);write('コ1. S配l・.......:コ コ');
gotoxy(20,30);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,31);write('コ2. S配l・.......:コ コ');
gotoxy(20,32);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘハヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,33);write('コ コ');
gotoxy(20,34);write('ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ');
gotoxy(39,19);write(kay.no);
gotoxy(39,21);write(kay.ad);
gotoxy(39,23);write(kay.soyad);
gotoxy(39,25);write(kay.y1);
gotoxy(39,27);write(kay.y2);
gotoxy(39,29);write(kay.s1);
gotoxy(39,31);write(kay.s2);
gotoxy(21,33);write('Aradiginiz kayit bu mu?...');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then exit;
clrscr;
end;
end;{for}
gotoxy(21,33);write('Aradiginiz kayit yok............');
readln;
close(dosya);
end;
procedure duzelt;
begin
clrscr;
assign(dosya,'d:\僭RENCI.DAT');
{$i-} reset(dosya); kod:=ioresult;{$i+}
if kod<>0 then
begin
writeln('Dosya Yok...');
tus:=readkey;
exit;
end;
write('Aradiginiz kisi nosu...?:');readln(ara1);
if ara1=0 then exit;
clrscr;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (ara1=kay.no) and (kay.f='*') then
begin
gotoxy(20,18);write('ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヒヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ');
gotoxy(20,19);write('コNo..............:コ コ');
gotoxy(20,20);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,21);write('コIsim............:コ コ');
gotoxy(20,22);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,23);write('コSoyad...........:コ コ');
gotoxy(20,24);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,25);write('コ1. Yazili.......:コ コ');
gotoxy(20,26);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,27);write('コ2. Yazili.......:コ コ');
gotoxy(20,28);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,29);write('コ1. S配l・.......:コ コ');
gotoxy(20,30);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,31);write('コ2. S配l・.......:コ コ');
gotoxy(20,32);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘハヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,33);write('コ コ');
gotoxy(20,34);write('ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ');
gotoxy(39,19);write(kay.no);
gotoxy(39,21);write(kay.ad);
gotoxy(39,23);write(kay.soyad);
gotoxy(39,25);write(kay.y1);
gotoxy(39,27);write(kay.y2);
gotoxy(39,29);write(kay.s1);
gotoxy(39,31);write(kay.s2);
gotoxy(21,33);write('D】eltilecek kayit bu mu___? [E\H]...:');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then
begin
clrscr;
gotoxy(30,20);write('[1] No.......');
gotoxy(30,22);write('[2] Adi......');
gotoxy(30,24);write('[3] Soyadi...');
gotoxy(30,26);write('[4] Y1.......');
gotoxy(30,28);write('[5] Y2.......');
gotoxy(30,30);write('[6] S1.......');
gotoxy(30,32);write('[7] S2.......');
repeat
tus:=readkey;
until tus in ['1','2','3','4','5','6','7'];
clrscr;
case tus of
'1':begin
write('Yeni no...:');
readln(kay.no);
end;
'2':begin
write('Yeni ad...:');
readln(kay.ad);
end;
'3':begin
write('Yeni soyad...:');
readln(kay.soyad);
end;
'4':begin
write('Yeni y1...:');
readln(kay.y1);
end;
'5':begin
write('Yeni y2...:');
readln(kay.y2);
end;
'6':begin
write('Yeni s1...:');
readln(kay.s1);
end;
'7':begin
write('Yeni s2...:');
readln(kay.s2);
end;
end;
seek(dosya,i);
write(dosya,kay);
clrscr;
write('islem tamamlandi...');
tus:=readkey;
exit;
end;
end;
end;
clrscr;
write('Kayit yok...');
close(dosya);
tus:=readkey;
end;
procedure sil;
begin
clrscr;
assign(dosya,'d:\僭RENCI.DAT');
{$i-} reset(dosya); kod:=ioresult;{$i+}
if kod<>0 then
begin
writeln('Dosya Yok...');
tus:=readkey;
exit;
end;
write('Silinecek kisi nosu...?:');readln(ara1);
if ara1=0 then exit;
clrscr;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (ara1=kay.no) and (kay.f='*') then
begin
gotoxy(20,18);write('ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヒヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ');
gotoxy(20,19);write('コNo..............:コ コ');
gotoxy(20,20);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,21);write('コIsim............:コ コ');
gotoxy(20,22);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,23);write('コSoyad...........:コ コ');
gotoxy(20,24);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,25);write('コ1. Yazili.......:コ コ');
gotoxy(20,26);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,27);write('コ2. Yazili.......:コ コ');
gotoxy(20,28);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,29);write('コ1. S配l・.......:コ コ');
gotoxy(20,30);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,31);write('コ2. S配l・.......:コ コ');
gotoxy(20,32);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘハヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,33);write('コ コ');
gotoxy(20,34);write('ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ');
gotoxy(39,19);write(kay.no);
gotoxy(39,21);write(kay.ad);
gotoxy(39,23);write(kay.soyad);
gotoxy(39,25);write(kay.y1);
gotoxy(39,27);write(kay.y2);
gotoxy(39,29);write(kay.s1);
gotoxy(39,31);write(kay.s2);
gotoxy(21,33);write('Silinecek kayit bu mu___? [E\H]...:');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then
begin
kay.f:='-';
seek(dosya,i);
write(Dosya,kay);
clrscr;
write('Kayit silindi...');
tus:=readkey;
exit;
end;
end;
end;
clrscr;
write('Kayit yok...');
tus:=readkey;
exit;
end;
procedure don;
begin
clrscr;
assign(dosya,'d:\僭RENCI.DAT');
{$i-} reset(dosya); kod:=ioresult;{$i+}
if kod<>0 then
begin
writeln('Dosya Yok...');
tus:=readkey;
exit;
end;
write('Geri y〔lenecek kaydin nosu...?:');readln(ara1);
if ara1=0 then exit;
clrscr;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (ara1=kay.no) and (kay.f='-') then
begin
gotoxy(20,18);write('ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヒヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ');
gotoxy(20,19);write('コNo..............:コ コ');
gotoxy(20,20);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,21);write('コIsim............:コ コ');
gotoxy(20,22);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,23);write('コSoyad...........:コ コ');
gotoxy(20,24);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,25);write('コ1. Yazili.......:コ コ');
gotoxy(20,26);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,27);write('コ2. Yazili.......:コ コ');
gotoxy(20,28);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,29);write('コ1. S配l・.......:コ コ');
gotoxy(20,30);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘホヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,31);write('コ2. S配l・.......:コ コ');
gotoxy(20,32);write('フヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘハヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘケ');
gotoxy(20,33);write('コ コ');
gotoxy(20,34);write('ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ');
gotoxy(39,19);write(kay.no);
gotoxy(39,21);write(kay.ad);
gotoxy(39,23);write(kay.soyad);
gotoxy(39,25);write(kay.y1);
gotoxy(39,27);write(kay.y2);
gotoxy(39,29);write(kay.s1);
gotoxy(39,31);write(kay.s2);
gotoxy(21,33);write('Y〔lenecek kayit bu mu___? [E\H]...:');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then
begin
kay.f:='*';
seek(dosya,i);
write(Dosya,kay);
clrscr;
write('Kayit geri y〔lendi...');
tus:=readkey;
exit;
end;
end;
end;
clrscr;
write('Kayit yok...');
tus:=readkey;
exit;
end;
procedure menu;
begin
clrscr;
gotoxy(25,20);write('---------MEN・--------');
gotoxy(28,22);write('[1] KAYIT');
gotoxy(28,24);write('[2] LISTELEME');
gotoxy(28,26);write('[3] ARA');
gotoxy(28,28);write('[4] D啝ENLE');
gotoxy(28,30);write('[5] SIL');
gotoxy(28,32);write('[6] DONUSUM');
gotoxy(28,34);write('[7] CIKIS');
repeat
tus:=readkey;
until tus in ['1','2','3','4','5','6','7'];
case tus of
'1':kayt;
'2':liste;
'3':ara;
'4':duzelt;
'5':sil;
'6':don;
'7':halt;
end;
end;
begin
clrscr;
repeat
menu;
until 1=2;
end.
zeki yılmaz
d_3vil@hotmail.com