|
-
May 13th, 2007, 12:28 PM
#11
Re: Help!
Thanks a lot, Pete. Sorry for interpreting my intentions in the wrong way, just that I'm a beginner, and a soddy one to say the least.
--------
// A program to find the sum and difference of two numbers
var firstNum;
var secondNum;
firstNum = window.prompt('Please enter the first number', '');
firstNum = parseFloat(firstNum);
secondNum = window.prompt('Please enter the second number', '');
secondNum = parseFloat(secondNum);
write('The sum of ' + (firstnum) + ' and ' + (secondNum) + 'is' + (firstNum + secondNum) + '<BR>');
write('The difference of ' + (firstNum) + ' and ' + (secondNum) + ' is ' + (firstNum - secondNum) + '<BR>');
--------
Oh, and I'm a Mac.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|