#include <iomanip>
//...
std::cout << std::fixed; //Make output stream use fixed point and not exponential representation
std::cout << std::setprecision(10); //Set how many digits after decimal point to show.
//There is no reason to set it higher than 10 for floats and 14 for doubles as other digits would be incorrect anyway.