uses crt,cerceve,dos;
type
kayit=record
adsoyad:string[20];
sinifno:string[14];
bolum:string[25];
adres:string[50];
veli:string[10];
d_tarih:string[10];
k_tarihi:string[10];
telefon:string[13];
disiplin:string[100];
tckimlik:string[11];
y1,y2,y3,s1:integer;
ort:real;
f:char;
end;
var
top:real;
x:integer;
dosya:file of kayit;
kay:kayit;
kod,i:integer;
t:char;
y,a,ag,hg,s,d,sn,sa:word;
procedure menu;
var
i:integer;
begin
clrscr;
textbackground(0);
textcolor(14);
kutu(1,18,80,22);
kutu(1,1,80,3);
kutu(1,4,40,18);
kutu(41,4,80,18);
kutu(1,22,80,24);
textcolor(4+128);
gotoxy(25,2);write(''''******™¦RENC˜ TAK˜P PROGRAMI******'''');
textcolor(14);
gotoxy(7,7);write(''''™¦RENC˜ KAYIT G˜R˜˜'''');
gotoxy(7,8);write(''''™¦RENC˜ B˜LG˜LER˜ ARAMA'''');
gotoxy(7,9);write(''''™¦RENC˜ KAYIT S˜LME'''');
gotoxy(7,10);write(''''™¦RENC˜ KAYIT DšZELTME'''');
gotoxy(7,11);write(''''KAYIT L˜STELEME'''');
textcolor(1);
gotoxy(7,12);write(''''€IKI'''');
textcolor(3);
gotoxy(45,7);writeln(''''Bu Program 29-11-2006 Tarihinde'''');
gotoxy(43,8);writeln(''''˜stanbul Menkul Kymetler Borsas'''');
gotoxy(43,9);writeln(''''Anadolu Meslek Lisesi ™§rencisi'''');
gotoxy(43,10);writeln(''''Aykut Pehlivan Tarafndan BitirilmiŸ'''');
gotoxy(43,11);writeln(''''ve Kullanma Hazr Hale getirilmiŸtir'''');
textcolor(15);
gotoxy(5,7);write(''''1-'''');
gotoxy(5,8);write(''''2-'''');
gotoxy(5,9);write(''''3-'''');
gotoxy(5,10);write(''''4-'''');
gotoxy(5,11);write(''''5-'''');
gotoxy(5,12);write(''''6-'''');
textcolor(3);
gotoxy(23,23);write(''''<<<HAZIRLAYAN:::Aykut PEHL˜VAN:::>>>'''');
gotoxy(70,2);getdate(y,a,ag,hg);write(ag,''''/'''',a,''''/'''',y);
textcolor(15);
gotoxy(10,19);write(''''>>LšTFEN YAPMAK ˜STED˜¦˜N˜Z ˜LEM˜N YANINDAK˜ SAYIYI G˜R˜N˜Z.'''');
textcolor(4+128);
gotoxy(10,20);write(''''>>SE€˜M˜N˜Z..........'''');
textcolor(15);
end;
procedure kayitek;
begin
assign(dosya,''''ogrenci.DAT'''');
{$i-} reset(dosya);kod:=IOResult;{$i+};
if kod<>0 then rewrite(dosya);
repeat
clrscr;
gotoxy(1,1);write(''''™§renci Ad ve Soyad Giriniz:............:'''');readln(kay.adsoyad);
if kay.adsoyad='''''''' then
begin
close(dosya);exit;
end;
write(''''™§rencinin snf ve numaras.......................:'''');readln(kay.sinifno);
write(''''™§rencinin b”lmn giriniz.........................:'''');readln(kay.bolum);
write(''''™§rencinin adresini giriniz.........................:'''');readln(kay.adres);
write(''''™§rencinin veli adn giriniz.......................:'''');readln(kay.veli);
write(''''™§rencinin do§um tarihini giriniz...................:'''');readln(kay.d_tarih);
write(''''™§rencinin kayt tarihini giriniz...................:'''');readln(kay.k_tarihi);
write(''''™§rencinin telefonunu giriniz.......................:'''');readln(kay.telefon);
write(''''™§rencinin disiplin cezas varsa giriniz............:'''');readln(kay.disiplin);
write(''''™§rencinin TC.Kimlik numarasn giriniz.............:'''');readln(kay.tckimlik);
textcolor(4);
writeln('''' ****Programlama yazl sonuclar****'''');
textcolor(15);
write(''''™§rencinin 1.yazl notu...........:'''');readln(kay.y1);
write(''''Ӥrencinin 2.yazl notu...........:'''');readln(kay.y2);
write(''''Ӥrencinin 3.yazl notu...........:'''');readln(kay.y3);
write(''''”§rencinin s”zl notu..............:'''');readln(kay.s1);
kay.ort:=(kay.y1+kay.y2+kay.y3+kay.s1)/4;
write(''''Ӥrencinin not ortalamas..........:'''');
textcolor(14);
write(kay.ort:2:0);
textcolor(15);
gotoxy(1,25);write(''''Bilgi Dosyaya Yazlsn m? '''');
textcolor(4+128);
write(''''[E/H]'''');
textcolor(15);
repeat
t:=upcase(readkey);
until t in [''''E'''', ''''H''''];
if t=''''E'''' then
begin
kay.f:=''''*'''';
Seek(dosya,filesize(dosya));
write(dosya,kay);
end
else exit;
until 1=2;
end;
procedure arama;
var
ara:string[30];
begin
assign(dosya,''''ogrenci.dat'''');
{$i-}reset(dosya);kod:=IOResult;{$i+}
if kod<>0 then
begin
gotoxy(20,20);
textcolor(4+128);
writeln(''''Dosya yok.........'''');
textcolor(15);
t:=readkey;
halt;
end;
repeat
clrscr;
write(''''Arad§nz ™§rencinin ismi:'''');readln(ara);
if ara='''''''' then
begin
close(dosya);exit;
end;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (kay.f=''''*'''') and (kay.adsoyad=ara) then
begin
clrscr;
writeln(''''™§renci Ad ve Soyad ..............................:'''',kay.adsoyad);
writeln(''''™§rencinin snf ve numaras.......................:'''',kay.sinifno);
writeln(''''™§rencinin b”lm.. ................................:'''',kay.bolum);
writeln(''''™§rencinin adresi...................................:'''',kay.adres);
writeln(''''™§rencinin veli ad.................................:'''',kay.veli);
writeln(''''™§rencinin do§um tarihi.. ..........................:'''',kay.d_tarih);
writeln(''''™§rencinin kayt tarihi.............................:'''',kay.k_tarihi);
writeln(''''™§rencinin telefonu.................................:'''',kay.telefon);
writeln(''''™§rencinin disiplin cezas .........................:'''',kay.disiplin);
writeln(''''™§rencinin TC.Kimlik numaras.......................:'''',kay.tckimlik);
textcolor(4);
writeln('''' ****programlama yazl sonu‡lar****'''');
textcolor(15);
writeln(''''™§rencinin 1.yazl notu...........:'''',kay.y1);
writeln(''''™§rencinin 2.yazl notu...........:'''',kay.y2);
writeln(''''™§rencinin 3.yazl notu...........:'''',kay.y3);
writeln(''''™§rencinin s”zl notu..............:'''',kay.s1);
write(''''™§rencinin not ortalamas..........:'''');
textcolor(14);
write(kay.ort:2:0);
textcolor(15);
gotoxy(1,23); write(''''Arad§nz kayt bu mu? '''');
textcolor(4+128);
write(''''[E/H]'''');
textcolor(15);
repeat
t:=upcase( readkey);
until t in [''''E'''',''''H''''];
if t=''''E'''' then exit;
end;
end;
writeln;
gotoxy(1,24);
textcolor(4+128);
writeln(''''Arad§nz kayt yok.......'''');
textcolor(15);
t:=readkey;
until t=#27;
end;
procedure silme;
var
ara:string[30];
begin
repeat
assign(dosya,''''ogrenci.dat'''');
{$i-} reset(dosya);kod:=IOresult;{$i+}
if kod<>0 then
begin
gotoxy(20,20);
textcolor(4+128);
writeln(''''Dosya yok....'''');
textcolor(15);
t:=readkey;halt;
end;
clrscr;
write (''''Silinecek isim....:'''');readln(ara);
if ara='''''''' then
begin
close(dosya);exit;
end;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (ara=kay.adsoyad) and (kay.f=''''*'''') then
begin
clrscr;
writeln(''''™§renci Ad ve Soyad ..............................:'''',kay.adsoyad);
writeln(''''™§rencinin snf ve numaras.......................:'''',kay.sinifno);
writeln(''''™§rencinin b”lm.. ................................:'''',kay.bolum);
writeln(''''™§rencinin adresi...................................:'''',kay.adres);
writeln(''''™§rencinin veli ad.................................:'''',kay.veli);
writeln(''''™§rencinin do§um tarihi.. ..........................:'''',kay.d_tarih);
writeln(''''™§rencinin kayt tarihi.............................:'''',kay.k_tarihi);
writeln(''''™§rencinin telefonu.................................:'''',kay.telefon);
writeln(''''™§rencinin disiplin cezas .........................:'''',kay.disiplin);
writeln(''''™§rencinin TC.Kimlik numaras.......................:'''',kay.tckimlik);
textcolor(4);
writeln('''' ****programlama yazl sonu‡lar****'''');
textcolor(15);
writeln(''''™§rencinin 1.yazl notu...........:'''',kay.y1);
writeln(''''™§rencinin 2.yazl notu...........:'''',kay.y2);
writeln(''''™§rencinin 3.yazl notu...........:'''',kay.y3);
writeln(''''™§rencinin s”zl notu..............:'''',kay.s1);
write(''''™§rencinin not ortalamas..........:'''');
textcolor(14);
writeln(kay.ort:2:0);
textcolor(15);
gotoxy(1,25);write(''''Silinecek kayt bu mu? '''');
textcolor(4+128);
writeln(''''[E/H]'''');
textcolor(15);
repeat
t:=upcase(readkey);
until t in [''''E'''',''''H''''];
if t=''''E'''' then
begin
kay.f:=''''s'''';
seek(dosya,i);
write(dosya,kay);
gotoxy(20,20);
textcolor(4+128);
writeln(''''Kayt silindi......'''');
textcolor(15);
close(dosya);
t:=readkey;
exit;
end;
end;{if}
end;{for}
gotoxy(20,20);
textcolor(4+128);
writeln(''''Kayt yok.....'''');
textcolor(15);
close(dosya);
t:=readkey;
until 1=2;
end;
procedure duzeltme;
var
ara:string[30];
begin
assign(dosya,''''ogrenci.dat'''');
{$i+} reset(dosya);kod:=IOresult;{$i+}
if kod<>0 then
begin
textcolor(4+128);
writeln(''''Dosya yok.......'''');
textcolor(15);
t:=readkey;
exit;
end;
clrscr;
write(''''Dzeltilecek isim.........:'''');readln(ara);
if ara='''''''' then
begin
close(dosya);
exit;
end;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if (ara=kay.adsoyad) and (kay.f=''''*'''') then
begin
clrscr;
writeln(''''™§renci Ad ve Soyad ..............................:'''',kay.adsoyad);
writeln(''''™§rencinin snf ve numaras.......................:'''',kay.sinifno);
writeln(''''™§rencinin b”lm.. ................................:'''',kay.bolum);
writeln(''''™§rencinin adresi...................................:'''',kay.adres);
writeln(''''™§rencinin veli ad.................................:'''',kay.veli);
writeln(''''™§rencinin do§um tarihi.. ..........................:'''',kay.d_tarih);
writeln(''''™§rencinin kayt tarihi.............................:'''',kay.k_tarihi);
writeln(''''™§rencinin telefonu.................................:'''',kay.telefon);
writeln(''''™§rencinin disiplin cezas .........................:'''',kay.disiplin);
writeln(''''™§rencinin TC.Kimlik numaras.......................:'''',kay.tckimlik);
textcolor(4);
writeln('''' ****programlama yazl sonu‡lar****'''');
textcolor(15);
writeln(''''™§rencinin 1.yazl notu...........:'''',kay.y1);
writeln(''''™§rencinin 2.yazl notu...........:'''',kay.y2);
writeln(''''™§rencinin 3.yazl notu...........:'''',kay.y3);
writeln(''''™§rencinin s”zl notu..............:'''',kay.s1);
write(''''™§rencinin not ortalamas..........:'''');
textcolor(14);
writeln(kay.ort:2:0);
textcolor(15);
gotoxy(1,25); write(''''Dzeltilecek kayt bu mu? '''');
textcolor(4+128);
writeln(''''[E/H]'''');
textcolor(15);
repeat
t:=upcase(readkey);
until t in [''''E'''',''''H''''];
if t=''''H'''' then exit;
if t=''''E'''' then
repeat
clrscr;
textcolor(15);
gotoxy(1,1);writeln(''''1-'''');
gotoxy(1,2);writeln(''''2-'''');
gotoxy(1,3);writeln(''''3-'''');
gotoxy(1,4);writeln(''''4-'''');
gotoxy(1,5);writeln(''''5-'''');
gotoxy(1,6);writeln(''''6-'''');
gotoxy(1,7);writeln(''''7-'''');
gotoxy(1,8);writeln(''''8-'''');
gotoxy(1,9);writeln(''''9-'''');
gotoxy(1,10);writeln(''''0-'''');
gotoxy(1,12);writeln(''''11-'''');
gotoxy(1,13);writeln(''''12-'''');
gotoxy(1,14);writeln(''''13-'''');
gotoxy(1,15);writeln(''''14-'''');
gotoxy(1,16);writeln(''''15-'''');
textcolor(14);
gotoxy(3,1);writeln(''''™§renci Ad ve Soyad ..............................:'''',kay.adsoyad);
gotoxy(3,2);writeln(''''™§rencinin snf ve numaras.......................:'''',kay.sinifno);
gotoxy(3,3);writeln(''''™§rencinin b”lm.. ................................:'''',kay.bolum);
gotoxy(3,4);writeln(''''™§rencinin adresi...................................:'''',kay.adres);
gotoxy(3,5);writeln(''''™§rencinin baba ad.................................:'''',kay.veli);
gotoxy(3,6);writeln(''''™§rencinin do§um tarihi.. ..........................:'''',kay.d_tarih);
gotoxy(3,7);writeln(''''™§rencinin kayt tarihi.............................:'''',kay.k_tarihi);
gotoxy(3,8);writeln(''''™§rencinin telefonu.................................:'''',kay.telefon);
gotoxy(3,9);writeln(''''™§rencinin disiplin cezas .........................:'''',kay.disiplin);
gotoxy(3,10);writeln(''''™§rencinin TC.Kimlik numaras.......................:'''',kay.tckimlik);
textcolor(4);
gotoxy(7,11);writeln(''''****programlama yazl sonu‡lar****'''');
textcolor(15);
textcolor(14);
gotoxy(4,12);writeln(''''™§rencinin 1.yazl notu...........:'''',kay.y1);
gotoxy(4,13);writeln(''''™§rencinin 2.yazl notu...........:'''',kay.y2);
gotoxy(4,14);writeln(''''™§rencinin 3.yazl notu...........:'''',kay.y3);
gotoxy(4,15);writeln(''''™§rencinin s”zl notu..............:'''',kay.s1);
textcolor(1);
gotoxy(4,16);writeln(''''˜Ÿlem yapmadan €kmak i‡in'''');
textcolor(15);
textcolor(4+128);
gotoxy(3,17);write(''''Seciminiz....(0..15):'''');
textcolor(15);
repeat
readln(x);
until x in[0..15];
case x of
1:begin
gotoxy(15,20);write(''''Yeni ˜sim....:'''');readln(kay.adsoyad);
end;
2:begin
gotoxy(15,20);write(''''Yeni snf ve numara......:'''');readln(kay.sinifno);
end;
3:begin
gotoxy(15,20);write(''''Yeni b”lm........:'''');readln(kay.bolum);
end;
4:begin
gotoxy(15,20);write(''''Yeni adres........:'''');readln(kay.adres);
end;
5:begin
gotoxy(15,20);write(''''Yeni baba ad.....:'''');readln(kay.veli);
end;
6:begin
gotoxy(15,20);write(''''Yeni do§um tarihi.:'''');readln(kay.d_tarih);
end;
7:begin
gotoxy(15,20);write(''''Yeni kayt tarihi.:'''');readln(kay.k_tarihi);
end;
8:begin
gotoxy(15,20);write(''''Yeni telefon no...:'''');readln(kay.telefon);
end;
9:begin
gotoxy(15,20);write(''''Yeni disiplin cezas.:'''');readln(kay.disiplin);
end;
0:begin
gotoxy(15,20);write(''''Yeni TC kimlik no...:'''');readln(kay.tckimlik);
end;
11:begin
gotoxy(15,20);write(''''Yeni 1.yazl notu...:'''');readln(kay.y1);
end;
12:begin
gotoxy(15,20);write(''''Yeni 2. yazl notu...:'''');readln(kay.y2);
end;
13:begin
gotoxy(15,20);write(''''Yeni 3. yazl notu...:'''');readln(kay.y3);
end;
14:begin
gotoxy(15,20);write(''''Yeni s”zl notu...:'''');readln(kay.s1);
end;
15:begin exit end;
end;
kay.ort:=(kay.y1+kay.y2+kay.y3+kay.s1)/4;
write(''''BaŸka de§iŸiklik yapmak istiyor musunuz '''');
textcolor(4+128);
writeln(''''[E/H]'''');
textcolor(15);
repeat
t:=upcase(readkey);
until t in[''''E'''',''''H''''];
until t=''''H'''';
begin
seek(dosya,i);
write(dosya,kay);
gotoxy(60,24);
textcolor(14+128);
write(''''iLEM TAMAMLANDI.....'''');
textcolor(15);
close(dosya);
t:=readkey;
exit;
end;
exit;
end;
end;
gotoxy(20,20);
textcolor(4+128);
write(''''Kayt yok.....'''');
textcolor(15);
close(dosya);
t:=readkey
end;
procedure listele;
var
s:integer;
begin
assign(dosya,''''ogrenci.dat'''');
{$i-}reset(dosya);kod:=IOResult;{$i+}
if kod<>0 then
begin
textcolor(4+128);
write(''''dosya yok.....'''');
textcolor(15);
t:=readkey;halt;
end;
clrscr;
writeln(''''AD SOYAD TC.K˜ML˜K NO SINIF NO B™LšM NOT ORT. TEL NO:'''');
writeln(''''------------- ------------- --------- ---------- --------- -------'''');
window(1,3,80,25);
s:=0;
for i:=0 to filesize(dosya)-1 do
begin
seek(dosya,i);
read(dosya,kay);
if kay.f=''''*''''then
begin
s:=s+1;
gotoxy(1,s);write(kay.adsoyad);
gotoxy(18,s);write(kay.tckimlik);
gotoxy(33,s);write(kay.sinifno);
gotoxy(44,s);write(kay.bolum);
textcolor(2);
gotoxy(60,s);write(kay.ort:2:0);
textcolor(15);
GOTOXY(68,S);write(kay.telefon);
end;
if s>18 then
begin
gotoxy(20,21);write(''''di§er sayfa i‡in bir tuŸa basn...'''');
t:=readkey;
s:=0;
clrscr;
end;
end;
gotoxy(20,21);write(''''listelenecek kaytlar bitti.....'''');
t:=readkey;
window(1,1,80,25);
close(dosya);
end;
procedure saat;
begin
repeat
gettime(s,d,sn,sa);
textcolor(3);
gotoxy(70,23);
write(s:2,'''':'''',d:2,'''':'''',sn:2);
textcolor(15);
until keypressed;
end;
begin
repeat
menu;
saat;
repeat
t:=readkey;
until t in [''''1''''..''''6'''',#27];
case t of
''''1'''':kayitek;
''''2'''':arama;
''''3'''':silme;
''''4'''':duzeltme;
''''5'''':listele;
''''6'''':halt;
end;
until t=#27;
end.
cezanefret17
cezanefret17@hotmail.com