We can't tell: it need your code running in context with your inputs to find out.
Certainly for me, an input of "1" gives no exception:
using System;
public class Program
{
public static void Main()
{
string input = "1";
Console.WriteLine(float.Parse(input));
}
}
Which means that your input has to be different to that, or your environment is wildly different!
So do two things.
1) Stop assuming user input will always be correct, and use the TryParse methods instead:
using System;
public class Program
{
public static void Main()
{
string input = "1";
float f;
if (!float.TryParse(input, out f))
{
Console.WriteLine($"\"{input}\" is not a valid floating point value");
return;
}
Console.WriteLine(f);
}
}
2) Use the debugger to look at exactly what is going on. Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.
Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!