How can I mathematically split up a 3 digit number?

The name of the pictureThe name of the pictureThe name of the pictureClash 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?










share|cite|improve this question







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














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?










share|cite|improve this question







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












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?










share|cite|improve this question







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






share|cite|improve this question







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.











share|cite|improve this question







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.









share|cite|improve this question




share|cite|improve this question






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
















  • 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










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.



  1. So 456 modulus 10 is 6, now you have the first digit.

  2. Then you can divide 456 with 10 without rest, you get 45

  3. Now 45 modulus 10 gives 5, now you have second digit

  4. Then you can divide 45 with 10 without rest, you get 4

  5. Now 4 modulus 10 gives 4, now you have last digit





share|cite|improve this answer



























    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






    share|cite|improve this answer




















      Your Answer





      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      );
      );
      , "mathjax-editing");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "69"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );






      Ben Beaumont is a new contributor. Be nice, and check out our Code of Conduct.









       

      draft saved


      draft discarded


















      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






























      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.



      1. So 456 modulus 10 is 6, now you have the first digit.

      2. Then you can divide 456 with 10 without rest, you get 45

      3. Now 45 modulus 10 gives 5, now you have second digit

      4. Then you can divide 45 with 10 without rest, you get 4

      5. Now 4 modulus 10 gives 4, now you have last digit





      share|cite|improve this answer
























        up vote
        3
        down vote



        accepted










        You can use the operation "modulus". It calculates the rest after you have divided by a number.



        1. So 456 modulus 10 is 6, now you have the first digit.

        2. Then you can divide 456 with 10 without rest, you get 45

        3. Now 45 modulus 10 gives 5, now you have second digit

        4. Then you can divide 45 with 10 without rest, you get 4

        5. Now 4 modulus 10 gives 4, now you have last digit





        share|cite|improve this answer






















          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.



          1. So 456 modulus 10 is 6, now you have the first digit.

          2. Then you can divide 456 with 10 without rest, you get 45

          3. Now 45 modulus 10 gives 5, now you have second digit

          4. Then you can divide 45 with 10 without rest, you get 4

          5. Now 4 modulus 10 gives 4, now you have last digit





          share|cite|improve this answer












          You can use the operation "modulus". It calculates the rest after you have divided by a number.



          1. So 456 modulus 10 is 6, now you have the first digit.

          2. Then you can divide 456 with 10 without rest, you get 45

          3. Now 45 modulus 10 gives 5, now you have second digit

          4. Then you can divide 45 with 10 without rest, you get 4

          5. Now 4 modulus 10 gives 4, now you have last digit






          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered 1 hour ago









          mathreadler

          14.3k72059




          14.3k72059




















              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






              share|cite|improve this answer
























                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






                share|cite|improve this answer






















                  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






                  share|cite|improve this answer












                  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







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered 1 hour ago









                  Aleksa

                  19512




                  19512




















                      Ben Beaumont is a new contributor. Be nice, and check out our Code of Conduct.









                       

                      draft saved


                      draft discarded


















                      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.













                       


                      draft saved


                      draft discarded














                      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













































































                      Comments

                      Popular posts from this blog

                      White Anglo-Saxon Protestant

                      BuddyTV

                      Conflict (narrative)