text: if(tol >= 0 || tol <= 5)
  tol <= 5.0will fail if tol is 5.0, because tol is probably something like 5.0 + 1e-15, so the equality test fails. It is not caught with the next else if clause, because of the
  tol >= 5.001
  numeric_limits<double>epsilon. This is the distance to the next representable number greater than 1.0. It needs to be scaled up for the number being compared. To check for equality, you need to work out the absolute value of the difference between your number and the comparison number. Then compare this to the scaled up epsilon.
  numeric_limits<double>epsilonin class yet so that's why i didn't use it and the numbers i used in the if/else where given to me in the instructions
  else ifclause, and the
  elseto catch any other value.
  #include<cmath>
  AB=D/(10^(C-1));
  AB=D/(pow(10,(C-1)));
  #include <math.h>
  #include<cmath>
  numeric_limits<double>epsilonis the difference between 1.0 and the next representable value and is about 1.0e-16. This value needs to be multiplied by the number you are dealing with.
  numeric_limits<double>epsilonin class. what i've been trying to say is that i can't use things in the code that i haven't even learned yet. my code is based off of what we have gone over.