Ok, so I'm sure this has a simple solution, but I can't work it out and it's really bugging me!

I've got my code, and the task is to generate two random numbers, the user then inputs an answer for them added together, then the program checks the answer and displays either "correct" or "wrong"

Here's some of my code:

<TITLE>Assessment Task 3 : Rohan Gardiner</TITLE>
function maths()
     	var response;
    	var answer;
answer = document.questions.answer.value; 
     if (answer==document.adding)
         	response = "correct";     
            response = "wrong";
     document.questions.result.value = response ;              
function randoms()
rndNum = Math.random();
Num = rndNum*20;
document.write(Math.round(Num)+"+"+ Math.round(Num1));	
function adding()
document.write(Math.round(Num) + Math.round(Num1));
<h1 align="center">Rohan Gardiner Assessment Task 3</h1>
<FORM NAME = "questions">

<SCRIPT Language=JavaScript> randoms(); </script>
<INPUT TYPE = "textbox" NAME = "answer" > <BR>  
<INPUT NAME = "dobutton" TYPE = "button" Value = "check"  onClick= "maths()">
<INPUT TYPE = "textbox" NAME = "result" >

Yes, I am a noobie coder. Please help