Overview
This VI contains 2 examples of how to extract the digits from an integer. I found this useful when trying the Vampire Numbers challenge and other number analysis applications.
Description
This VI uses two different methods to break an integer into a numeric array of its digits. The first method divides by decreasing factors of 10 and outputs the quotients in an array. The second method converts the integer to a string, removes characters from the string and converts the resulting array back into integers.
Steps to Implement or Execute Code
- Input the integer you want to extract digits from.
- Run the VI.
- Observe the results of the two different methods in the output arrays.
Requirements
Software
LabVIEW 2010 or later
Hardware
None
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**