C# Girilen Metni Merdivenli Yazdırma - Bilişim Konuları

C# Girilen Metni Merdivenli Yazdırma

Klavyeden girilen bir metin ifadeyi merdivenli şekilde alt alta ekrana yazdıran C# Console programının kodlarıdır.

Ekran görüntüsü

Programın C# kodları:

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

namespace Örnekler
{
    class Program
    {
        static void Main(string[] args)
        {
            string ad;
            Console.Write("Adınızı giriniz :");
            ad = Console.ReadLine();
            for (int i = 0; i <= ad.Length; i++)
            {
                Console.WriteLine(ad.Substring(0, i));
            }
            Console.ReadKey();
        }
    }
}
Bu Yazıya Tepkin Nedir?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Yorum Yap

1 Yorum