How can I mathematically split up a 3 digit number?

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
For example, if I have 456, How can I split this and then let each column value be a separate number? The only way I can think of doing this would be to subtract '100' n times until that column is '0' and storing the number of subtractions, leaving '4' then repeating for the other columns. Is there a quicker way?
real-numbers
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
3
down vote
favorite
For example, if I have 456, How can I split this and then let each column value be a separate number? The only way I can think of doing this would be to subtract '100' n times until that column is '0' and storing the number of subtractions, leaving '4' then repeating for the other columns. Is there a quicker way?
real-numbers
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Why not divide by $100?$
â saulspatz
1 hour ago
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
For example, if I have 456, How can I split this and then let each column value be a separate number? The only way I can think of doing this would be to subtract '100' n times until that column is '0' and storing the number of subtractions, leaving '4' then repeating for the other columns. Is there a quicker way?
real-numbers
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
For example, if I have 456, How can I split this and then let each column value be a separate number? The only way I can think of doing this would be to subtract '100' n times until that column is '0' and storing the number of subtractions, leaving '4' then repeating for the other columns. Is there a quicker way?
real-numbers
real-numbers
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 1 hour ago
Ben Beaumont
233
233
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Ben Beaumont is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Why not divide by $100?$
â saulspatz
1 hour ago
add a comment |Â
Why not divide by $100?$
â saulspatz
1 hour ago
Why not divide by $100?$
â saulspatz
1 hour ago
Why not divide by $100?$
â saulspatz
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
You can use the operation "modulus". It calculates the rest after you have divided by a number.
- So 456 modulus 10 is 6, now you have the first digit.
- Then you can divide 456 with 10 without rest, you get 45
- Now 45 modulus 10 gives 5, now you have second digit
- Then you can divide 45 with 10 without rest, you get 4
- Now 4 modulus 10 gives 4, now you have last digit
add a comment |Â
up vote
1
down vote
Divide $456$ with $100$ without remainder, you get $4$ - the first digit
Now $456 - 4cdot100 = 56$ - subtract $100$ times the first digit
Now divide $56$ with $10$ without remainder to get 5 - the second digit
Now do $56 - 5cdot10 = 6$ - last digit
You can use $mod$ to get them another way, from last (or first if you call it that way) to first digit
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
You can use the operation "modulus". It calculates the rest after you have divided by a number.
- So 456 modulus 10 is 6, now you have the first digit.
- Then you can divide 456 with 10 without rest, you get 45
- Now 45 modulus 10 gives 5, now you have second digit
- Then you can divide 45 with 10 without rest, you get 4
- Now 4 modulus 10 gives 4, now you have last digit
add a comment |Â
up vote
3
down vote
accepted
You can use the operation "modulus". It calculates the rest after you have divided by a number.
- So 456 modulus 10 is 6, now you have the first digit.
- Then you can divide 456 with 10 without rest, you get 45
- Now 45 modulus 10 gives 5, now you have second digit
- Then you can divide 45 with 10 without rest, you get 4
- Now 4 modulus 10 gives 4, now you have last digit
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
You can use the operation "modulus". It calculates the rest after you have divided by a number.
- So 456 modulus 10 is 6, now you have the first digit.
- Then you can divide 456 with 10 without rest, you get 45
- Now 45 modulus 10 gives 5, now you have second digit
- Then you can divide 45 with 10 without rest, you get 4
- Now 4 modulus 10 gives 4, now you have last digit
You can use the operation "modulus". It calculates the rest after you have divided by a number.
- So 456 modulus 10 is 6, now you have the first digit.
- Then you can divide 456 with 10 without rest, you get 45
- Now 45 modulus 10 gives 5, now you have second digit
- Then you can divide 45 with 10 without rest, you get 4
- Now 4 modulus 10 gives 4, now you have last digit
answered 1 hour ago
mathreadler
14.3k72059
14.3k72059
add a comment |Â
add a comment |Â
up vote
1
down vote
Divide $456$ with $100$ without remainder, you get $4$ - the first digit
Now $456 - 4cdot100 = 56$ - subtract $100$ times the first digit
Now divide $56$ with $10$ without remainder to get 5 - the second digit
Now do $56 - 5cdot10 = 6$ - last digit
You can use $mod$ to get them another way, from last (or first if you call it that way) to first digit
add a comment |Â
up vote
1
down vote
Divide $456$ with $100$ without remainder, you get $4$ - the first digit
Now $456 - 4cdot100 = 56$ - subtract $100$ times the first digit
Now divide $56$ with $10$ without remainder to get 5 - the second digit
Now do $56 - 5cdot10 = 6$ - last digit
You can use $mod$ to get them another way, from last (or first if you call it that way) to first digit
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Divide $456$ with $100$ without remainder, you get $4$ - the first digit
Now $456 - 4cdot100 = 56$ - subtract $100$ times the first digit
Now divide $56$ with $10$ without remainder to get 5 - the second digit
Now do $56 - 5cdot10 = 6$ - last digit
You can use $mod$ to get them another way, from last (or first if you call it that way) to first digit
Divide $456$ with $100$ without remainder, you get $4$ - the first digit
Now $456 - 4cdot100 = 56$ - subtract $100$ times the first digit
Now divide $56$ with $10$ without remainder to get 5 - the second digit
Now do $56 - 5cdot10 = 6$ - last digit
You can use $mod$ to get them another way, from last (or first if you call it that way) to first digit
answered 1 hour ago
Aleksa
19512
19512
add a comment |Â
add a comment |Â
Ben Beaumont is a new contributor. Be nice, and check out our Code of Conduct.
Ben Beaumont is a new contributor. Be nice, and check out our Code of Conduct.
Ben Beaumont is a new contributor. Be nice, and check out our Code of Conduct.
Ben Beaumont is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2984282%2fhow-can-i-mathematically-split-up-a-3-digit-number%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password

Why not divide by $100?$
â saulspatz
1 hour ago