🎯 I Tuoi Obiettivi
- ✅ Converti Celsius → Fahrenheit:
(C × 9/5) + 32 - ✅ Converti Fahrenheit → Celsius:
(F - 32) × 5/9 - ✅ Arrotonda con
toFixed(1) - ✅ Mostra il risultato formattato
🔥 Celsius → Fahrenheit
32.0°F
⇄
❄️ Fahrenheit → Celsius
0.0°C
📐 Formule
Celsius → Fahrenheit
°F = (°C × 9/5) + 32
Esempi: 0°C = 32°F | 100°C = 212°F
Fahrenheit → Celsius
°C = (°F - 32) × 5/9
Esempi: 32°F = 0°C | 212°F = 100°C
💡 Suggerimenti
Struttura Evento
btnCtoF.addEventListener('click', function() {
const c = Number(celsiusInput.value);
const f = (c * 9/5) + 32;
fahrenheitResult.textContent = f.toFixed(1) + '°F';
});