Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
{
printf(" ----------------------------------------------------------------n");
printf(" >>> BELIRTI MENUSU <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> |1| Belirti Listele <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> |2| Belirti Ekle <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> |3| Belirti Sil <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> |4| Belirti Guncelle <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> |5| Ilac Tavsiyesi <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> |0| Ana Menuye Don <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> LUTFEN SECIM YAPINIZ : ");
int secim;
if(scanf("%d",&secim)==1)
{
switch(secim)
{
case 1:
system("cls");
BelirtiListele();
break;
case 2:
system("cls");
BelirtiEkle();
break;
case 3:
system("cls");
BelirtiSil();
break;
case 4:
system("cls");
BelirtiGuncelle();
break;
case 5:
system("cls");
Tavsiye();
break;
default:
system("cls");
printf(" ------------------------------------------------------------------n");
printf(" >>> Gecersiz Secim. Tekrar Deneyin. <<<n");
printf(" ------------------------------------------------------------------n");
Sleep(1000);
system("cls");
Sleep(1000);
anaMenu();
break;
}
}
else
{
system("cls");
//printf("Hatali giris. Lutfen gecerli bir sayi girin.n");
printf(" ------------------------------------------------------------------n");
printf(" >>> Hatali giris. Lutfen gecerli bir sayi girin. <<<n");
printf(" ------------------------------------------------------------------n");
//Hatalı girişi temizleme
int c;
while ((c = getchar()) != 'n' && c != EOF);
Sleep(1000);
system("cls");
anaMenu();
}
}
void BelirtiEkle()
{belirti h1;
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti Islemleri <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti No: ");
scanf(" %[^n]s",&h1.no);
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti Giriniz: ");
scanf(" %[^n]s",&h1.belirti);
printf(" ----------------------------------------------------------------n");
Sleep(1500);
system("cls");
FILE *ptr=fopen("belirti.dat","a+b");
fwrite(&h1,sizeof(belirti),1,ptr);
fclose(ptr);
system("cls");
//printf("nİşlem Başarılı...");
//printf("n Menüye Yönlendiriliyorsunuz");
printf(" ----------------------------------------------------------------n");
printf(" >>> Islem Basarili <<<n");
printf(" >>> Menuye Yonlendiriliyorsunuz... <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls");
BelirtilerMenusu();
}
void BelirtilerIlacIcin()
{
belirti h1;
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti Listesi <<<n");
printf(" ----------------------------------------------------------------n");
FILE *bptr =fopen("belirti.dat","r+b");
while( fread(&h1,sizeof(belirti),1,bptr)!=NULL )
{
printf(" %s %s n",h1.no,h1.belirti);
// printf("%s %sn",h1.no,h1.belirti);
}
printf(" ----------------------------------------------------------------n");
fclose(bptr);
}
void BelirtiListele()
{
char tus;
belirti h1;
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti Listesi <<<n");
printf(" ----------------------------------------------------------------n");
FILE *ptr =fopen("belirti.dat","r+b");
while( fread(&h1,sizeof(belirti),1,ptr)!=NULL )
{
printf(" %s %s n",h1.no,h1.belirti);
// printf("%s %sn",h1.no,h1.belirti);
}
printf(" ----------------------------------------------------------------n");
fclose(ptr);
printf(" >>> LUTFEN BIR TUSA BASINIZ : ");
tus=_getch();
system("cls");
//printf("nMenuye Yonlendiriliyorsunuz");
printf(" ----------------------------------------------------------------n");
printf(" >>> Menuye Yonlendiriliyorsunuz... <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls;");
BelirtilerMenusu();
}
void BelirtiSil()
{
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti Silme <<<n");
printf(" ----------------------------------------------------------------n");
char hastano[20];
belirti h1;
int sonuc=0;
printf(" >>> Belirti No: ");
scanf("%s",hastano);
printf(" ----------------------------------------------------------------n");
FILE *ptr= fopen("belirti.dat","r+b");
FILE *yptr=fopen("belirtiyedek.dat","w+b");
while( fread(&h1, sizeof(belirti), 1, ptr)!=NULL )
{
if(strcmp(hastano,h1.no)!=0)
fwrite(&h1,sizeof(belirti),1,yptr);
else
{
sonuc=1;
}
}
fclose(ptr);
fclose(yptr);
if( sonuc == 1 )
{
remove("belirti.dat");
rename("belirtiyedek.dat","belirti.dat" );
//printf("Belirti Silindi n");
printf(" >>> Belirti Silindi <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls");
//printf("Menuye Yonlendiriliyorsunuzn");
printf(" ----------------------------------------------------------------n");
printf(" >>> Menuye Yonlendiriliyorsunuz... <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls");
BelirtilerMenusu();
}
else
{
//printf("Belirti kaydiniz bulunamadi !n") ;
//printf("nMenuye Yonlendiriliyorsunuz");
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti kaydiniz bulunamadi! <<<n");
printf(" >>> Menuye Yonlendiriliyorsunuz... <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls");
BelirtilerMenusu();
}
}
void BelirtiGuncelle()
{
belirti h1;
char hastano[20];
char yeniAd[35];
int sonuc=0;
int sayac=0;
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti Guncelleme <<<n");
printf(" ----------------------------------------------------------------n");
printf(" >>> Belirti No: ");
scanf("%s",hastano);
printf(" ----------------------------------------------------------------n");
FILE *ptr=fopen("belirti.dat","r+b");
while( fread(&h1,sizeof(belirti),1,ptr)!=NULL)
{
if(strcmp(hastano,h1.no)==0)
{
sonuc=1;
system("cls");
//printf("No : %snBelirti :%s",h1.no,h1.belirti);
printf("n>>> No : %s ",h1.no);
printf("n>>> Belirti : %s ",h1.belirti);
break;
}
sayac++;
}
if(sonuc==0)
{
//printf("Boyle Bir No Yokn");
printf(" >>> Boyle Bir No Yok <<<n");
printf(" ----------------------------------------------------------------n");
fclose(ptr);
Sleep(1000);
system("cls");
//printf("Menuye Yonlendiriliyorsunuz");
printf(" ----------------------------------------------------------------n");
printf(" >>> Menuye Yonlendiriliyorsunuz... <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls");
BelirtilerMenusu();
}
else
{
//printf("nYeni Ismi Giriniz :");
printf("n ----------------------------------------------------------------n");
printf(">>> Yeni Ismi Giriniz : ");
scanf("%s",yeniAd);
rewind(ptr);
strcpy(h1.belirti,yeniAd);
fseek(ptr,(sayac)*sizeof(belirti),0);
fwrite(&h1,sizeof(belirti),1,ptr);
fclose(ptr);
//printf("Guncelleme Tamamlandı");
printf(" ----------------------------------------------------------------n");
printf(" >>> Guncelleme Tamamlandi <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(1000);
system("cls");
//printf("Menuye Yonlendiriliyorsunuz");
printf(" ----------------------------------------------------------------n");
printf(" >>> Menuye Yonlendiriliyorsunuz... <<<n");
printf(" ----------------------------------------------------------------n");
Sleep(2000);
system("cls");
BelirtilerMenusu();
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team