Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 322 Bytes

get-digits.md

File metadata and controls

7 lines (4 loc) · 322 Bytes

Get Digits

When you want to get all the digits of a integer n, instead of doing n /= 10, n % 10, use to_string(n). It's shorter and less error-prone. For example, you don't need to consider n = 0.

Problems