If I type 0.01 or 0.02 the the program just exits immediately. What do I do?
#include char line[100]; float amount; int main() { printf(\"E
What is the most effective way for float and double comparison?
You should use something like this
bool isEqual(double a, double b) { return fabs(a - b) < EPSILON; }
or this
#define ISEQUAL(a,b) ( fabs((a) - (b)) < EPSILON)
and define EPSILON
#define EPSILON (0.000001)