Untitled
unknown
plain_text
4 years ago
3.1 kB
9
Indexable
int s1,k,id,d1;
int[] maas = new int[6];
maas[0] = 12000;
maas[1] = 12000;
maas[2] = 12000;
maas[3] = 12000;
maas[4] = 12000;
maas[5] = 12000;
int i = 0;
int kod = 48971;
string[,] hasta = new string[100,5];
x:
Console.WriteLine("Doktorsanız 1'e Hasta iseniz 2'ye basın...\nÇıkmak için 0'a basın");
string[] doktor = new string[6];
doktor[0] = "Ali Aslan";
doktor[1] = "Hasan Mutlu";
doktor[2] = "Selin Demir";
doktor[3] = "Beyza Turan";
doktor[4] = "Nihal Çetin";
doktor[5] = "Kemal Uzun";
s1=Convert.ToInt32(Console.ReadLine());
if (s1 == 1)
{
Console.WriteLine("Yetkili Kodunu Giriniz:");
k = Convert.ToInt32(Console.ReadLine());
if (k == kod)
{
Console.WriteLine("Doktor ID girin:");
id = Convert.ToInt32(Console.ReadLine())-1;
Console.WriteLine(doktor[id]);
Console.WriteLine("maaşı: "+maas[id]+"tl");
goto x;
}else
{
Console.WriteLine("Yanlış Kod");
goto x;
}
}
if (s1 == 2)
{
Console.WriteLine("ad:");
hasta[i,0]=Console.ReadLine();
Console.WriteLine("soyad:");
hasta[i, 1] = Console.ReadLine();
Console.WriteLine("Bölüm giriniz: \n1: Pediatri\n2: KBB\n3: Nöroloji\n4: Dahiliye\n5:Onkoloji");
hasta[i,2] = Console.ReadLine();
T:
Console.WriteLine("Doktor No Seçiniz:");
Console.WriteLine("1"+doktor[0]);
Console.WriteLine("2"+doktor[1]);
Console.WriteLine("3"+doktor[2]);
Console.WriteLine("4"+doktor[3]);
Console.WriteLine("5"+doktor[4]);
Console.WriteLine("6"+doktor[5]);
d1 = Convert.ToInt32(Console.ReadLine());
if (d1 == 1)
maas[0] = maas[0] + 50;
else if(d1 == 2)
maas[1] = maas[1] + 50;
else if (d1 == 3)
maas[2] = maas[2] + 50;
else if (d1 == 4)
maas[3] = maas[3] + 50;
else if (d1 == 5)
maas[4] = maas[4] + 50;
else if (d1 == 6)
maas[5] = maas[5] + 50;
else
{
Console.WriteLine("Hatalı Giriş Tekrar Dene");
goto T;
}
Console.WriteLine("Hastalığı giriniz:");
hasta[i, 4] = Console.ReadLine();
i++;
goto x;
}else
{
System.Environment.Exit(0)Editor is loading...