In the original C program the output was done as
for(i = 0; i < N; i++)
printf("%-10.4lf", x[i]);
and it looks like
23.4500 22.4420 65.2300 82.3000 7.0000 104.0900
The C++ edition
for(i = 0; i < N; i++)
std::cout << x[i];
make output as
23.4522.44265.2382.37104.09
What should be changed in C++ edition to see the same result?