document.getElementById("c") yo can replace this by $("#c")
if you use getElementById use a dot instead like: $(".c")
var x;
if (degree == "C") {
x = $("#c").val() * 9 / 5 + 32;
$("#f").val() = Math.round(x);
}
else if(degree == 'F'){
x = ($("#f").val() -32) * 5 / 9;
$("#c").val() = Math.round(x);
}
I also should use this instead of id, makes the code more readable.
<p><input id="c" onchange="convert(this)" onkeyup="convert(this)" type="number" > degrees Celsius</p>
<p><input id="f" onkeyup="convert(this)" type="number"> degrees Fahrenheit</p>
function convert(e)
{
x = $(e).val() * 9 / 5 + 32;
$(e).val() = Math.round(x);
}