Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Javascript help please.?

Hi.

I have successfully inputted three variables through prompt boxes.

However i am supposed to find the , sum, product and average of these.

I did find the product of two of the figures but couldnt get the 3 to work together. Now im all confused..LOL

Any help would be great. Simple language please, im a self confessed dummy :D

Update:

<html>

<head>

<script type="text/javascript">

<title> Javascript</title>

<!--

</head>

document.write("Hello. Welcome to JavaScript. We will read in 3 figures and complete mathematical questions.!")

var num1 = prompt("What is the first number?", "Type number here");

var num2 = prompt("What is the second number?", "Type number here");

var num3 = prompt("What is the third number?", "Type number here");

var linebreak = "<br />";

//-->

<body>

var Multiply = num1*num2

document.write Num1 and Num2 multiplied is, Multiply

</script>

</body>

</html>

Update 2:

Thanks a mill! i couldnt figure out how to use parseInt..LOL

Im going to change the alert to document.write and mess around with the numbers but it looks perfect.

Kudos. :)

1 Answer

Relevance
  • ?
    Lv 7
    1 decade ago
    Favorite Answer

    You should post the code you've already written.

    Edit:

    Does this help you?

    http://pastebin.com/2U1PEF7K

    Glad I could help!

Still have questions? Get your answers by asking now.