Modulus and Hyphens

////
Last edited on
The question relates to your other thread: http://www.cplusplus.com/forum/beginner/119278/

I presume that your number is an integral type. Consider this:
1
2
3
auto number{123456789};
std::cout << number % 1000 << '\n';
std::cout << number / 1000 << '\n';
Topic archived. No new replies allowed.