Advertisement
AnandaVieira

Exercicio 28

Mar 29th, 2021
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ScriptCSharp
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.        
  10.             /*28 – Ler uma temperatura em graus Kelvin e apresentá-la convertida em graus Celsius.
  11.             A fórmula de conversão é: C = K – 273.15, sendo C a temperatura em Celsius e K a
  12.             temperatura em Kelvin.
  13.             */
  14.  
  15.             Console.Write("Qual a temperatura em graus Kelvin: ");
  16.             double kel = double.Parse(Console.ReadLine());
  17.  
  18.             double cel = kel - 237.15;
  19.  
  20.             Console.WriteLine("A temperatura em graus Kelvin, convertida para Celsius é: "+ cel);
  21.            
  22.         }
  23.     }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement