Given an string of binary number n. The task is to convert binary fractional n into it’s decimal equivalent.
Input: n = 110.101 Output: 6.625 Input: n = 101.1101 Output: 5.8125
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains a string n.
For each test case in a new line print the equivalent decimal equivalent of the binary string n.
1<=length of s<=50
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.