Exercício 14: Convertendo Celsius para Kelvin Kelvin e Fahrenheit

Escreva um programa que receba um valor em Celsius e converta para Kelvin e Fahrenheit

Saída esperada:

[Entrada]:> 30
Kelvin = 33
Fahrenheit = 86

Solução C#:

mostrar solução

public class Exerc
{
   public static void Main( )
    {
        Console.Write("[Entrada]:> "); 
        int celsius = Convert.ToInt32(Console.ReadLine());
 
        Console.WriteLine("Kelvin = {0}", celsius + 273);
        Console.WriteLine("Fahrenheit = {0}", celsius * 18 / 10 + 32);
    }
}

esconder solução

The following two tabs change content below.
Arquiteto de Software e Desenvolvedor Backend (quase Fullstack), geralmente trabalho com C#, PowerShell, Python, Golang, bash e Unity (esse é mais por hobby). Estou sempre buscando algo novo para aprender, adicionando novas ferramentas ao meu cinto de utilidades.
Posted in Básicos, Exercícios and tagged , , , , .