Link to home
Start Free TrialLog in
Avatar of AlreadyGoogled
AlreadyGoogled

asked on

simple bit shift

Hi,

Is there any simple bitshift I can use to isolate each digit of a number?

int nTheNumber = 3651;

int nThousands = 3;
int nHundreds = 6;
int nTens = 5;
int nOnes = 1;

I just want to isolate each digit of the number, thanks.
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlreadyGoogled
AlreadyGoogled

ASKER

Thanks Kent.