Having trouble giving the correct digits for my $ output.
every time i plug in for example 8 in the statement i get numbers with 3 digits Ex. 10.9 While i would like it to display $10.90
I just added the setprecision hoping that it will fix the issue, did not work
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int Ts; // holds Ts
float Price, Tcost, Total;
cout << "How many shirts you like ?" << endl;
cin >> Ts;
Total = 12 * Ts;
if ( 5 < Ts && Ts < 10)
Tcost = (Total - (.10 * Total));
Price = (Tcost / Ts);
cout << "he cost per shirt is $" << setprecision(4) << Price << " and the total cost is $" << Tcost << setprecision(4) << endl;
return 0;
}