1. 1076.
    0
    #include <stdio.h>
    5. include <stdlib.h>
    6. include <math.h>
    7. include <conio.h>
    8. include <string.h>

    typedef struct{
    int id;
    int tc;
    char ad[20];
    char soyad[20];
    int tel;
    char adres[100];
    }ogr;

    ogr ogrList[20];

    int main(void){
    int i=0,silinecek;
    char key;
    printf("Kayit eklemek icin 'e'\nSilmek icin 's'\nGuncellemek icin 'g'\nListelemek icin 'l',cikis icin 'q' 'ya basin.");
    scanf("%c",&key);
    while(key!='q'){
    i=i+1;
    switch(key){
    case 'e':
    printf("ID: ");
    scanf("%d",&ogrList[i].id);
    printf("\nTC NO: ");
    scanf("%d",&ogrList[i].tc);
    printf("\nAd Soyad: ");
    scanf("%s %s",&ogrList[i].ad,&ogrList[i].soyad);
    printf("\nTel No: ");
    scanf("%d",&ogrList[i].tel);
    printf("\nAdres: ");
    scanf("%s",&ogrList[i].adres);
    break;


    case 's':
    printf("Silmek istediginiz ogrencinin id'sini girin: ");
    scanf("%d",&silinecek);
    for(int j=0;j<i;j++){
    if(silinecek==ogrList[j].id){
    ogrList[j].id=0;
    printf("%s %s adindaki ogrencinin kaydi silindi.",ogrList[j].ad,ogrList[j].soyad);

    }
    }
    break;

    case 'g':
    printf("Guncellendi.\n");
    break;

    case 'l':
    for(int k=0;k<i;k++){
    if(ogrList[k].id!=0){
    printf("ID: %d",ogrList[k].id);
    printf("\nTc No: %d",ogrList[k].tc);
    printf("\nAd Soyad: %s %s",ogrList[k].ad,ogrList[k].soyad);
    printf("\nTelefon: %d",ogrList[k].tel);
    printf("\nAdres: %s\n\n",ogrList[k].adres);
    }
    }
    break;

    default:
    printf("Kayit eklemek icin 'e'\nSilmek icin 's'\nGuncellemek icin 'g'\nListelemek icin 'l',cikis icin 'q' 'ya basin.") ;
    break;
    }
    scanf("%c",&key);
    }







    }
    ···
   tümünü göster