You are given a null-terminated string representing a floating-point number, which may contain:
Your task is to convert this string to its floating-point value (float), without using standard library functions like atof() or strtof().Do not handle scientific notation (e.g., "1.2e5").
Example-1
Input: "123.45" Output: 123.45
Example-2
Input: "-0.75" Output: -0.75
Example-3
Input: "100" Output: 100.00
Example-4
Input: "+9.99" Output: 9.99
Test Cases
Test Results
Input
123.45
Expected Output