public class ConversorTemperatura {
public static void main(String[] args) {
//Temp em celsius
double tempCelsius = 17.6;
//Conversão
double tempFah = (tempCelsius * 1.8) + 32;
//Resultado
System.out.println("A temperatura em celsius é: "+tempCelsius + "°");
System.out.println("A temperatura em Fahrenheit é: "+tempFah + "°");
//Arredondamento
int tempFahInt = (int)Math.round(tempFah);
System.out.println("A temperatura em Fahrenheit, arrendondada, segue: "+tempFahInt + "°");
}
}