hello everyone i want bit help regarding a code i wanna create a matrix of 125*3, that will store values from 1-3

Write your question here.
hello everyone i want bit help regarding a code
i wanna create a matrix of 125*3, that will store values from 1-3 i.e
000
001
002
003
010
011
012
013
021
it will look some sort of this, please tell me the best algo to create such code
I don't understand. When you say "values from 1-3" do you mean digits from 1 to 3? If so, what about the digit 0. It looks like you are using that, too. And what do you mean by "matrix"? A 125 by 3 matrix of ints? Of chars?

You have (almost) listed the first 9 three-digit base-4 numbers, except that you skipped 020 for some reason. Also, there are only 64 three-digit base-4 numbers, so why is your matrix size 125?
Last edited on
Topic archived. No new replies allowed.