I have a variable:
float number;
this is assigned from user input.
If the variable is assigned 5 I want to convert it to a decimal and get a result of 0.5.
Or the user might input 56 in which case i want it to be converted to 0.56.
Or 678 to 0.678. I need the number in hand to be converted as the second part of a decimal number.
Basically the value of the float has to become the value after the decimal point in the number.
I've tried turning it into string first but no luck. Any ideas?