cout << "The absolute value of\t" << a << "is\t %lf", fabs (a);
a is the variable
You don't need format strings with streams, you have the << operator:
cout << "The absolute value of\t" << a << "is\t " << fabs (a);
Kind of a mix of Python and C you've got there...