Home > Net >  Please everyone a great god
Please everyone a great god

Time:09-24

Use an array to store a hexadecimal number, and converts the hexadecimal number to a binary after deposit in the array, the final output,

CodePudding user response:

42

If use Chinese said, 42
If the said in English, forty - two
If using hexadecimal representation, 2 a
If use binary representation, 0010, 1010

Is not the same as the name, or demonstration method is different, but they are the same number in mathematics,

Your problem can be written as:
1, there is now a array used to store some Numbers,
2, there is some form of input (for example, is a decimal 42), how to convert a number into the array,
3, according to a certain format (hexadecimal, 8 hexadecimal, binary is ok), print the array to the screen,

CodePudding user response:

reference 1st floor github_36000833 response:
and

If use Chinese said, 42
If the said in English, forty - two
If using hexadecimal representation, 2 a
If use binary representation, 0010, 1010

Is not the same as the name, or demonstration method is different, but they are the same number in mathematics,

Your problem can be written as:
1, there is now a array used to store some Numbers,
2, there is some form of input (for example, is a decimal 42), how to convert a number into the array,
3, according to a certain format (hexadecimal, 8 hexadecimal, binary is ok), print the array to the screen,

Great god
O how do you write the code

CodePudding user response:

 
String ss=the Convert. ToString (0 XFF, 2);//hexadecimal conversion to 2 hexadecimal
  •  Tags:  
  • C #
  • Related