Can someone tell me what's happening here?

 System Administrator <[EMAIL PROTECTED]>wrote:

From: System Administrator <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Undeliverable: [jdjlist] Re: Getting digits from an integer
Date: Fri, 6 Sep 2002 01:20:20 +0800

Your message

To: JDJList
Subject: [jdjlist] Re: Getting digits from an integer
Sent: Fri, 6 Sep 2002 00:34:13 +0800

did not reach the following recipient(s):

[EMAIL PROTECTED] on Fri, 6 Sep 2002 01:20:11 +0800
The recipient name is not recognized
The MTS-ID of the original message is: c=us;a= ;p=synergix
technol;l=JUPITER0209051720R3TQTX75
MSEXCH:IMS:Synergix Technologies Pte Ltd:Synergix:JUPITER 0 (000C05A6)
Unknown Recipient


> ATTACHMENT part 2 message/rfc822 From: Anthony Grace <[EMAIL PROTECTED]>
To: JDJList <[EMAIL PROTECTED]>
Subject: [jdjlist] Re: Getting digits from an integer
Date: Fri, 6 Sep 2002 00:34:13 +0800

That's my point. So what we get printed out is:


3, 2, 0


...whereas Jeff wanted to get:


3, 2, 1 ??


Maybe I missed something here?


Paul Franz wrote:


Dividing by 10 makes it 0.

Paul Franz

----- Original Message -----
From: Anthony Grace
To: JDJList
Sent: Thursday, September 05, 2002 10:58 AM
Subject: [jdjlist] Re: Getting digits from an integer


what happens when number=1 on the final pass?


Paul Franz wrote:


You need to do the following:

while (number != 0)
{
System.out.println ("digit = "+(number % 10));
number /= 10;
}

The >> is a binary shift operator.

Paul Franz
----- Original Message -----
From: "Jeff Fisher"
To: "JDJList"
Sent: Wednesday, September 04, 2002 7:59 AM
Subject: [jdjlist] Getting digits from an integer


> I need to be able to get each individual digit from an integer as an
> integer. I think I should be able to do this by using the >> operator,
but
> I just can't seem to figure it out.
>
> For example if I have a number 123, I need to get 3, then the 2, then the
1.
> It doesn't really matter the order, I just need the digits. I suppose I
> could convert it to a string and go that route, but that seems ! like a
waste.
>
> Does anyone have experience with this or can point me to some
> examples/information.
>
> Thanks
>
> Jeff
>
> To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
>


To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm




_____

Do You Yahoo!?
Yahoo! Finance
- Get
real-time stock quotes To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm




_____

Do You Yahoo!?
Yahoo! Finance
- Get
real-time stock quotes To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm



Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

Reply via email to