function displayTemp(){
if (document.forms[0].elements[1].checked){
var tempVal = document.forms[0].yourInput.value
var finalC = (tempVal-32)*5/9
var finalTemp = Math.round(finalC) + " degrees Celcius"
}
if (document.forms[0].elements[2].checked){
var tempVal = document.forms[0].yourInput.value
var finalF = (tempVal*9/5)+32
var finalTemp = Math.round(finalF) + " degrees Fahrenheit"
}
document.forms[1].result.value = finalTemp;
}
</script>