Question: Write a java method that accepts an integer as parameter and returns a string as an expression of the sum of powers of 2 in
Write a java method that accepts an integer as parameter and returns a string as an expression of the sum of powers of 2 in increasing order. (Non-duplicate)
Sample Input: 20 Sample Output: 20 = 4+16
Sample Input: 2021 Sample Output: 2021 = 1+4+32+64+128+256+512+1024
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
