Konversi Suhu C# Posted by Unknown on December 01, 2014 Get link Facebook X Pinterest Email Other Apps Dengan keterangan program : - Input berupa : Suhu dalam Celsius. - Rumus konversi yang digunakan : R = C x 4/5 F = (C x 9/5) + 32 K = C + 273 using System; using System.Collections.Generic; using Syestem.Linq; using System.Text; using System.Threading.Tasks; namespace konversi_suhu { class Program { static void Main(string[] args) { int celcius; float reaumur, fahrenheit; int kelvin; //input Console.Write("Input suhu dalam celcius = "); celcius = Convert.ToInt32(Console.ReadLine()); //proses reaumur = (float)celcius * 4 / 5; fahrenheit = (float)celcius * 9 / 5 + 32; kelvin = celcius + 273; Console.WriteLine(); //menampilkan hasil Console.WriteLine("Besaran dalam Reaumur = {0}",reaumur); Console.WriteLine("Besaran dalam Fahrenheit = {0}",fahrenheit); Console.WriteLine("Besaran dalam Kelvin = {0}",kelvin); Console.ReadKey(); } } } Comments
Comments
Post a Comment