Function inside math function
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>
answer = document.questions.answer.value;
response = "correct";
response = "wrong";
document.questions.result.value = response ;
rndNum = Math.random();
Num = rndNum*20;
document.write(Math.round(Num) + Math.round(Num1));
<h1 align="center">Rohan Gardiner Assessment Task 3</h1>
<FORM NAME = "questions">
<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 :(
Simple Math Equation Help Needed
I have two, dollar values (a and b). I need to divide the larger (max) into the smaller (min) and multiply by 100 to get the percentage difference (c value) for box3.
I've tried multiple variations, and tried researching this relatively simple equation to find code, but without finding or understanding what I need. I'm not a programmer and need help.
This is my best attempt: