cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Modulus and Hyphens
Modulus and Hyphens
Dec 8, 2013 at 10:15pm UTC
mjyz
(39)
////
Last edited on
Dec 9, 2013 at 5:39am UTC
Dec 8, 2013 at 10:32pm UTC
keskiverto
(10402)
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.