C++ Int to Array without Libs -
good morning, how can convert int = 325; array int b[2], without lib? mean b[0] = 3;, b[1] = 2; , b[2] = 5;
int = 325;
int b[2]
b[0] = 3;
b[1] = 2;
b[2] = 5;
bye
do like:
int x = a; int = 0; while (x > 0) { b[i++] = x % 10; x /= 10; }
c++
No comments:
Post a Comment