Question: I want to use c programming to rearrange a binary number entered by I user. The rearrangement pattern is as follows: a: 1 2 3
I want to use c programming to rearrange a binary number entered by I user.
The rearrangement pattern is as follows:
a: 1 2 3 4 5 6 7 8 9 10
b: 3 5 1 7 4 10 1 9 8 6
Essentially, when the user enters a binary number, the output of that number should follow the method above.
For example, the third digit of the input number is the first digit of the output number.
The fifth digit of the input number is the second digit of the output number, and so on.
As such, if the input number is: 1 0 1 0 0 0 0 0 1 0.
Then the output number is: 1 0 0 0 0 0 1 1 0 0.
How would I use C to implement this method?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
