You could change floats to doubles to give yourself more precision. But the underlying problem that would still remain is that floating-point arithmetic is inherently inexact; your computer only has finite numeric precision. http://floating-point-gui.de/basic/
Instead, change the way you print the output so that it makes really small numbers just round to 0.
1 2 3 4 5 6 7 8 9
#include <iomanip>
#include <iostream>
int main()
{
double a = 4.013e-045;
std::cout << a << std::endl; // display default
std::cout << std::fixed << std::setprecision(10) << a << std::endl; // display "rounded" to 10th decimal
}
The problem is that you wrote x1 on both lines 25 and 26. Change the second one to x2.
And input variable names of a, b, and c would be a lot clearer and neater!