💻 Programlama Derslerimize Hoşgeldiniz 💻

💻  Programlama  Derslerimize  Hoşgeldiniz 💻
// Hello1.cs Genel sınıf Hello1 { Public static void Ana () { System.Console.WriteLine ("Merhaba, Dünya!"); } }

C # CONSOLE PROGRAM 1 (Klavyeden Girilen Sayının EnBüyük ve EnKüçüğünü Bulan Program..


   KLAVYEDEN GİRİLEN 10 SAYININ 

                       EN BÜYÜK VE EN                       

 KÜÇÜK OLANINI BULAN PROGRAM.


HER PROGRAM İÇİN PAYLAŞIMLARI GÖRMEK İÇİN SİTEMİZİ TAKİP EDİN..


KAYNAK KOD

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication16
{
    class Program
    {
        static void Main(string[] args)
        {
            
            

            int enBuyuk, enKucuk, sayi, sayi2, sayac = 1;
            Console.Write("Bir Sayi Giriniz: ");
            sayi = Convert.ToInt32(Console.ReadLine());
            enBuyuk = sayi;
            enKucuk = sayi;
        tekrar:
            if (sayac < 10)
            {

                Console.Write("Bir Sayi Giriniz : ");
                sayi2 = Convert.ToInt32(Console.ReadLine());
                if (sayi2 > enBuyuk)
                {
                    enBuyuk = sayi2;
                }
                else if (sayi2<enKucuk)
                {
                    enKucuk = sayi2;
                }
                
                sayac++;
                goto tekrar;

            }
            Console.WriteLine("En Büyük Sayi {0}", enBuyuk);
            Console.WriteLine("En Küçük Sayi {0}", enKucuk);

            Console.ReadKey();
        }
    }
}

Share on Google Plus

About Emrah MENTEŞE

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 yorum:

Yorum Gönder