Looking for some help I have 99% of the program figured out just trying to make it look pretty. When running a math function how do you get the output to come out as currency, Ive messed with adding a decimal and 00 at the end but is there a string format or something that would make the result always hold the two decimal spaces?
Here is the code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
int calculatedRetail ()
{
float cost;
float mark;
float markup;
float total;
float cents=00;
cout<<"Please enter the Cost:"<<endl;
cin>>cost;
cout<<"Please enter the markup value"<<endl;
cin>>mark;
markup=cost*mark;
cout<<markup;
total=cost+markup;
cout<<"$"<<total<<endl<<endl;
return total;
}
Hopefully I posted this right thanx again for your time