how to add two number using jquery its not working plz help me

how to add two number using jquery its not working plz help me



<head>
<title>Jq work</title>
<script src="js/jquery-3.2.1.js" ></script>

<script>
$(document).ready(function(){
     var a = $('#num1').val();
     var b = $('#num2').val();
 
$('#submit').click(function()
var c = parseInt(a) + parseInt(b);
$('#num3').val(c);
        alert(c);         
    });
});


</script>

</head>

<body>
<table>
<form name="myform" method="#" action="#" >
<tr>
<td><input type="text" name="num1" id="num1" /></td>
</tr>

<tr>
<td>
<input type="text" name="num2" id="num2" />
</td>
</tr>

<tr>
<td>
<input type="text" name="num3" id="num3" />
</td>
</tr>

<tr>
<td>
<input type="submit" id="submit" name="submit" value="submit" />
</td>
</tr>
</form>
<tr>
<td>
<input type="text" name="n1" id="n1" />
</td>
<td>
<input type="text" name="n2" id="n2" />
</td>
</tr>
</table>


</body>
</html>