View falnshower's post (How to split a nu...) for this comment.

SmileBASIC Community

Oscar

Spoilers · 09/07/2016 3:27 PMPlayed

Use the DIV and MOD instructions. DIV returns the integer division of two values and MOD returns the remainder of the integer division. You can employ these two operators in a way that you can get each individual digit in a number. For example... 10298 MOD 10 will return 8. 10298 DIV 10 will return 1029. 1029 MOD 10 will return 9. 10298 DIV 100 will return 102. Etc.

Advertisement

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Edit Comment

Select an action: