vendredi 24 octobre 2014

Storing a char n number of times in 1 loop


Vote count:

1




Given an array of numbers [2,1,1] Given an array of chars [x,y,z];


Trying to create a char array that looks like [x,x,y,z] // put in char times its number in first array. so @index 0 char is x and value is 2 so put x x


I can do this using 2 loops but is it possible to do it only using 1 loop? to make things less complex?



asked 3 mins ago







Storing a char n number of times in 1 loop

Aucun commentaire:

Enregistrer un commentaire