Given a number, the task is to set all odd bits of a number.
INPUT: The first line consists of an integer T i.e. the number of test cases. Each test case contains an integer n .
OUTPUT: For each test case, print the number formed after setting all the odd bits of the given number in newline.
Input : 20 Output : 21 Explanation : Binary representation of 20 is 10100. Setting all odd bits make the number 10101 which is binary representation of 21. Input : 10 Output : 15
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.