double is a floating point data type. What this means is that the decimal point is not fixed at some position, but moves as necessary. If you're having problems aligning numbers on the screen, try something like this:
Code:
#include <cstdio>
int main()
{
double d[] = { 5.5, -12.599, 124.42112 };
int i;
// Loop through all elements of the array
for(i = 0; i < sizeof(d) / sizeof(d[0]); i++)
// %9.5f specifies that a double is being passed,
// which should be formatted to be at least 9
// characters long with 5 characters after the
// after the decimal point.
printf("%9.5f\n", d[i]);
// Output is:
// 5.50000
// -12.59900
// 124.42112
return 0;
}