Skip to content

Instantly share code, notes, and snippets.

@dinhhuydh
Created December 11, 2017 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dinhhuydh/193cff39c6725d27f8643328ed009a7e to your computer and use it in GitHub Desktop.
Save dinhhuydh/193cff39c6725d27f8643328ed009a7e to your computer and use it in GitHub Desktop.
# 1 Print square of number from 1 to n
# eg1: squares(3) => [1, 4, 9]
# 2: Print all numbers with 3 digits have two '1' digits like 112, 131
# 3. Calculate sum of digits in the numbers
# eg1: [12, 4, 154] => [3, 4, 10]
# 4. Transform a number to simple word of digits
# eg1: 12 => one two
# eg2: 498 => four nine eight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment