Konversi Suhu Dengan Fungsi C# Posted by Unknown on January 14, 2015 Get link Facebook X Pinterest Email Other Apps using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MODUL7_3 { class Program { static float Reaumur(int celcius) { return celcius * 4 / 5f; } static float fahrenheit(int celcius) { return celcius * 9 / 5f + 32; } static int kelvin(int celcius) { return celcius + 273; } static void Main(string[] args) { int celcius; Console.Write("Input Suhu Celcius = "); celcius = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(); Console.WriteLine("Suhu dalam Reaumur = {0}", Reaumur(celcius)); Console.WriteLine("Suhu dalam Fahrenheit = {0}", fahrenheit(celcius)); Console.WriteLine("Suhu dalam Kelvin = {0}", kelvin(celcius)); Console.ReadKey(); } } } Comments
Comments
Post a Comment