Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Maths problem
From: PSWoods
Date: Wed, 13 Dec 2000 06:19:23 GMT

how about:

for(i=0;i<=8;i++){
sumOfDigits += nineDigitString.charAt(i);
}

...you mite need to put charAt(i) in a number() wrapper so you don't get a
string.

----- Original Message -----
From: "pm" <pm_cathotmail [dot] com>
To: <flasheratchinwag [dot] com>
Sent: Tuesday, December 12, 2000 10:50 PM
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 helpatchinwag [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 helpatchinwag [dot] com


Replies
  FLASH: Maths problem, pm

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]