I have a array of ints
num[0]
num[1]
num[2]
If the values are 3, 4 and 6 i need to make them into one number like 346. I have no clue even where to start.
I have a array of ints
num[0]
num[1]
num[2]
If the values are 3, 4 and 6 i need to make them into one number like 346. I have no clue even where to start.
int bigNum = num[0];
bigNum *= 10 + num[1];
bigNum *= 10 + num[2];
I think PaulS meant:
int bigNum = num[0];
bigNum = (bigNum*10) + num[1];
bigNum = (bigNum*10) + num[2];
;)
Thanks to both of you :D . It worked great.