public class Principal {
public static void main(String[] args) {
int tempCelsius = 20;
double tempFahrenheit = (tempCelsius * 9 / 5.0) + 32;
System.out.println("A temperatura em graus Fahrenheit é: " + tempFahrenheit);
}
}
Saída:
A temperatura em graus Fahrenheit é: 68.0