Use foreach instead of for when looping of digits
More verbose printing
Add C/C++ backward compat note