Home > Back-end >  In c for arbitrary number of bits
In c for arbitrary number of bits

Time:11-07

Topic is: input an integer, output the number of bits, such as the output less than 3, 123-234, output, 4 requirements is to use the do. While. For this to do, if cannot be directly used to judge the positive and negative,,,,

CodePudding user response:

#include
#include
Then use itoa, strlen can

CodePudding user response:

To determine the positive and negative, negative one, and then into a positive number, has been in addition to October, don't add 1 to 0 digits, finally to 0, add a 1 end,
  • Related