separate digits of a long number in c++ -
i have example long number 12345678901 , want separately each digit use it. tried hard didn't make far? ideas?
but have problem in of them when try number of 11 digits , more (that want) program stops working i'm running program in visual studio in other case-smaller numbers--is fine.. connection fact number long?
this give digits in variable b.
long = 12345678901; while(a > 0) { long b = % 10; /= 10; }
Comments
Post a Comment