19 Ekim 2011 Çarşamba

C# Console Klavyeden Girilen İki Değere Dört İşlem Yapan Program

Klavyeden Girilen İki Değere Dört İşlem Yapan Program



{
double x, y;
double toplama, cikartma, carpma, bolme;
Console.Write("Lütfen X Değerini Giriniz = ");
x = Convert.ToInt32(Console.ReadLine());
Console.Write("Lütfen Y Değerini Giriniz = ");
y = Convert.ToInt32(Console.ReadLine());
toplama = x + y;
cikartma = x - y;
bolme = x / y;
carpma = x * y;
Console.WriteLine("x+y = " + toplama);
Console.WriteLine("x-y = " + cikartma);
Console.WriteLine("x/y = " + bolme);
Console.WriteLine("x*y = " + carpma);
Console.Write("Programdan Çıkmak İçin Enter'e Basınız");
Console.ReadKey();
}

0 yorum:

Yorum Gönder