Kullanıcının girmiş olduğu yaş bilgisine göre yaşanan Ay, Hafta, Gün, Saat, Dakika ve Saniye Bilgileri Hesaplayan C# Console Uygulaması
int yas = 0; int ay = 0; int hafta = 0; long gun = 0; long saat = 0; long dakika = 0; long saniye = 0; //http://www.bilisimogretmeni.com/ Console.WriteLine("n Yasiniz kac : "); yas = Int16.Parse(Console.ReadLine()); ay = (int) yas * 12; hafta = (int) yas * 52; gun = (long) yas * 365; saat = (long) yas * 365 * 24; dakika = (long) yas * 365 * 24 * 60; saniye = (long) yas * 365 * 24 * 60 * 60; Console.WriteLine("n Yasiniz {0} olduguna gore :", yas); //http://www.bilisimogretmeni.com/ Console.WriteLine("n{0} ay",ay); Console.WriteLine("n{0} hafta", hafta); Console.WriteLine("n{0} gun", gun); Console.WriteLine("n{0} saat", saat); Console.WriteLine("n{0} dakika", dakika); Console.WriteLine("n{0} saniye", saniye); Console.WriteLine("n yasamissiniz."); Console.ReadKey();
bu asla net bir sonuc vermez