#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<math.h>
int secim,i,k,ogrno[19],not1[19],not2[19],not3[19],soz1[19],soz2[19],ort[19];
char ad[19][20],soyad[19][20];
bilgigir()
{
int x,bayrak;
bayrak=0;
clrscr();
for(i=0;i<=19;i++)
{
if(!strcmp(ad[i],"")){bayrak=1;break;}
}
if (bayrak==0)
{printf("Kayt yapacak alan yoktur!");}
else
{
printf("%d ogrencinin adn giriniz.........:",i+1);scanf("%s",ad[i]);
printf("%d ogrencinin soyadn giriniz......:",i+1);scanf("%s",soyad[i]);
printf("%s %s numarasn giriniz...............:",ad[i],soyad[i]);scanf("%d",&ogrno[i]);
do//1.not giriŸi kontrol edilerek
{
printf("%s %s 1.yazl notunu giriniz..........:",ad[i],soyad[i]);
scanf("%d",¬1[i]);
}
while(not1[i]<0 || not1[i]>100);
do//2.not giriŸi
{
printf("%s %s 2.yazl notunu giriniz..........:",ad[i],soyad[i]);
scanf("%d",¬2[i]);
}
while(not2[i]<0 || not2[i]>100);
do//3.not giriŸi
{
printf("%s %s 3.yazl notunu giriniz..........:",ad[i],soyad[i]);
scanf("%d",¬3[i]);
}
while(not3[i]<0 || not3[i]>100);
do//1.S”zl notu kontroll giriŸ
{
printf("%s %s 1.s”zl notunu giriniz..........:",ad[i],soyad[i]);
scanf("%d",&soz1[i]);
}
while(soz1[i]<0 || soz1[i]>100);
do//2.S”zl notu kontroll giriŸ
{
printf("%s %s 2.s”zl notunu giriniz..........:",ad[i],soyad[i]);
scanf("%d",&soz2[i]);
}
while(soz2[i]<0 || soz2[i]>100);
}
//bilgigiriŸ prosedrn kapat
}
arama()
{
int orts,bayrak,numara;
char *durum;
char devam;
clrscr();
do
{
clrscr();
bayrak=0;
printf("Aranacak KiŸinin numarasn giriniz.....:");scanf("%d",&numara);
for(i=0;i<=19;i++)
{
if(ogrno[i]==numara)
{
orts=floor((not1[i]+not2[i]+not3[i]+soz1[i]+soz2[i])/5);
if (orts<45) {strcpy(durum,"kald");}else{strcpy(durum,"ge‡ti");}
printf("ogrno ad soyad not1 not2 not3 soz1 soz2 ort durum\n ");
printf("%d %s %s %d %d %d %d %d %d %s \n ",ogrno[i],ad[i],soyad[i],not1[i],not2[i],not3[i],soz1[i],soz2[i],orts,durum);
bayrak=1;
break;
}
}
if (bayrak==0){printf("Arad§nzKaytBulunamad\n");}
printf("Yeni Arama Yapmak ˜stiyormusunuz(E/H)......:");
scanf("%s",devam);
}
while(devam=='E'|| devam=='e');
}
listeleme()
{
printf("Tasarm AŸamasnda");
}
siralama()
{
printf("Tasarm AŸamasnda");
}
main()
{
do
{
clrscr();
printf("1-KiŸi Ekleme\n");
printf("2-Arama\n");
printf("3-Listeleme\n");
printf("4-Sralama\n");
printf("5-€kŸ\n");
printf("Se‡iminizi yapnz(1/5)");scanf("%d",&secim);
switch(secim)
{
case 1:bilgigir();break;
case 2:arama();break;
case 3:listeleme();break;
case 4:siralama();break;
case 5:break;
default:printf("YanlŸ GiriŸ yaptnz");break;
}
}
while(secim!=5);
printf("Program Sonlandrld TeŸekkr Ederiz");
clrscr();
getch();
}