C# Console Projeleri 3 – Basamak Sayısı Bul Uygulaması v1.0
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 32 33 |
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kod_S_Basamak_Sayisi_Bul_v1._0 { class Program { static void Main(string[] args) { float Sayi; int Bs = 1; Console.Write("Sayiyi Giriniz="); Sayi = float.Parse(Console.ReadLine()); float Sonuc = Sayi; while (Sonuc >= 10) { Bs++; Sonuc = Sonuc / 10; } Console.WriteLine("Basamak Sayisi=" + Bs); Console.ReadKey(); } } } |