Fix what? What's the problem? Compile errors? Doesn't run? Gives the wrong answer? Getting error messages? What messages?
What kind of help are you looking for?
Please learn to use code tags (the <> formatting button) when posting code.
A couple of obvious errors:
1) func_command is declared with 4 parameters, but when you call it, you only call it with 3 parameters. That should be causing a compile error.
2) You need to #include <stdlib.h> if you're going to use atof.