1. Ana Sayfa
  2. Programlama Temelleri

C# Gidilecek Yol Uzaklığı ve Süreye Göre Hızı Hesaplayan Program

C# Gidilecek Yol Uzaklığı ve Süreye Göre Hızı Hesaplayan Program
0

Kullanıcının girmiş olduğu Gidilecek Yol Uzaklığı ve Süreye Göre kaç km ile gidilmesi gerektiğini hesaplayan C# Console Uygulaması


            int mesafe = 0;
            int zaman = 0;
            double hiz = 0;

            Console.WriteLine("n Gidilecek mesafe (km): ");
            mesafe = Int16.Parse(Console.ReadLine());
            
            Console.WriteLine("n Varis zamani (saat) : ");
            zaman = Int16.Parse(Console.ReadLine());
            //http://www.bilisimogretmeni.com
            hiz = (double)mesafe / zaman;

            Console.WriteLine("n Hiziniz : {0} olmalidir.", hiz);

            Console.ReadKey();

mesafe

Bu İçeriğe Tepkin Ne Oldu?
Subscribe
Bildir
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Yorum
Inline Feedbacks
View all comments