Decimal to Binary with float

Write programs below :
Decimal to Binary
Each of your programs must be able to convert both integer and float. Also, it will not ask the user to input anything else other than the number they want it to be converted.
You cannot use any base conversion functions to directly convert the number.

for floats, you need to divide your program in two parts:

e.g: for 13.5

  • find binary for 13
  • find binary for .5

And append the result. I will try to write one program. If you have tried it, please show us.