public class CelsiusFahrenheit { public static void main (String[] arg){ double celsius = 32.5; double fahrenheit = (celsius * 1.8) ; String mensaje = """ La temperatura en grados Celsius es de %.1f, o en grados Fahrenheit es de %.1f. """.formatted(celsius , fahrenheit ); System.out.println(mensaje);
int celsiusFahrenheit = (int) fahrenheit;
System.out.println(String.format("Convesión de temperatura fahrenheit a entero: %d", celsiusFahrenheit));
}
}