B Boo025 Member Oct 6, 2006 79 0 66 Mar 10, 2007 #1 Let's say I have an interger, 12345. Is there a way to extract 5 from 12345?
Schadenfroh Elite Member Mar 8, 2003 38,416 4 0 Mar 10, 2007 #2 Is there a way to extract 5 from 12345 without having to use loop? Click to expand... Yes Use cin.get() in conjunction with cin.ignore() statements or if you are looking for nonfixed number place, you will need to use modulus.
Is there a way to extract 5 from 12345 without having to use loop? Click to expand... Yes Use cin.get() in conjunction with cin.ignore() statements or if you are looking for nonfixed number place, you will need to use modulus.
X xtknight Elite Member Oct 15, 2004 12,974 0 71 Mar 10, 2007 #3 ((((12345 % 10000) % 1000) % 100) % 10) = 5