Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: Maths problem |
From: | Benoit Martin |
Date: | Wed, 13 Dec 2000 04:30:48 GMT |
try something like:
var addition=0;
var processedDigit=0;
for (i=8; i>=0; i--) {
processedDigit = Math.floor(nineDigitsNumber/(Math.pow(10, i)));
addition+=processedDigit;
nineDigitsNumber-=processedDigit * (Math.pow(10, i));
}
where your 9 digits number is stored in the "nineDigitsNumber" variable
hope that helps !
Benoit Martin
Web Engineer
Digital Mediums
Ala Moana Pacific Center
1585 Kapiolani Blvd, Suite 1204
Honolulu, HI 96814
Ph.: (808)943.9992
Fax: (808)943.9998
http://www.digitalmediums.com
-----Original Message-----
From: ownerchinwag [dot] com [ownerchinwag [dot] com]On">mailto:ownerchinwag [dot] com]On Behalf Of pm
Sent: Tuesday, December 12, 2000 5:51 PM
To: flasherchinwag [dot] com
Subject: FLASH: Maths problem
hello,
If i have a varaible which prompt the user to enter a 9 digit numbers e.g
123456789 and i wish to perform an arithmetic addtion of the numbers i.e
1+2+3+4+5+6+7+8+9. How do i do that ?
Thks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: Maths problem, pm
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]