This is the code I have right now :
cout << "==============================\n";
cout << setprecision(2) << fixed;
cout << "Shelby" << setw(24) << shelby << endl;
And this is the output:
==============================
Shelby 25.81
But what I'm trying to do is add a "$" sign before the amount while keeping the last number in the line in line with the line above "===="
but when I put this code in:
cout << "==============================\n";
cout << setprecision(2) << fixed;
cout << "Shelby" << setw(24) << "$" << shelby << endl;
I get the output:
==============================
Shelby $25.81
Can anyone help me fix this?
(Keep in mind that sometimes the number left of the decimal can reach triple digits or may only be 1 digit)