Csharp Console Girilen 3 Sayıdan Enbüyüğü ve En Küçüğü

Spectrum Artz

Web | Graphics
Ultra Member
Katılım
31 Tem 2019
Konular
443
Mesajlar
524
Tepkime puanı
111
Klavyeden girilen üç tane sayıdan en büyüğünü ve en küçüğünü bulup sonuçları ekrana yazan programın c# console ekranda yapılmış hali ve c# kodları




C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            int x, y, z,enbuyuk=0,enkucuk=0;
            Console.Write("Birinci sayıyı giriniz:");
            x = Convert.ToInt16(Console.ReadLine());
            Console.Write("İkinci sayıyı giriniz:");
            y = Convert.ToInt16(Console.ReadLine());
            Console.Write("Üçüncü sayıyı giriniz:");
            z = Convert.ToInt16(Console.ReadLine());
            Console.WriteLine("---------------------------");
            if (x > y & x > z) { enbuyuk = x; }
            if (y > x & y > z) { enbuyuk = y; }
            if (z > y & z > x) { enbuyuk = z; }
            Console.WriteLine("En büyük sayı:" + enbuyuk);
            if (x < y & x < z) { enkucuk = x; }
            if (y < x & y < z) { enkucuk = y; }
            if (z < y & z < x) { enkucuk = z; }
            Console.Write("En küçük sayı:" + enkucuk);
            Console.ReadKey();
        }
    }
}


Programın ekran görüntüsü

csharpconsoleucsayidanenbuyugu.jpg



Download Nulled WordPress Themes
Download Premium WordPress Themes Free
Download WordPress Themes Free
Download Nulled WordPress Themes
download udemy paid course for free
download micromax firmware
Download WordPress Themes Free


 

Üst