1
resposta

Conversão de temperaturas

public class Main { public static void main(String[] args) {

   double temperatura = 29;

   double  temperaturaFahrenheit = (temperatura * 1.8) + 32;
    System.out.println("Temperatura em Fahrenheit: " + temperaturaFahrenheit);








}

}

Garanta sua matrícula hoje e ganhe + 2 meses grátis

Continue sua jornada tech com ainda mais tempo para aprender e evoluir

Quero aproveitar agora
1 resposta

Olá Rogerio, tudo bem?

O código que você postou está correto para converter a temperatura em graus Celsius para Fahrenheit.

Espero ter ajudado e bons estudos!