Given the base-e log, you can always find the log to any other base, with the formula: logbase(x) =loge(x) / loge(base). For example, a computer scientist might be interested in how many bits are needed to express a given positive integer x in binary. In that case, the total number of bits required is log2(x), rounded up to the next higher integer. Write a Java statement that (1) calculates the number of bits required to store variable x’s value and (2) assigns that calculated value into an int variable named bits.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.