This is how the program is setup.
The atof() function isn't working the way it should, and is producing bogus numbers. Any idea's?
Normally I'd just start with a float, but this is for a bigger program. I just made a little script that re-produces this problem for me. Any idea's?
Results:Code:#include <stdio.h> int main(void) { char test[100]; double num = 0; printf("Testing number: "); gets(test); num = atof(test); printf("num = %.2f\n", num); return 0; }
Testing number: 45
num = 2293232.00
Thanks,
Mellowz