Should specify no trailing zeros. Using setprecision(2) will yield standard money notation. The rest of your formatting should be controlled via setw(); *only* the minimum number of decimal places should be controlled via setprecision().Code:cout << "text" << fixed << right << setw(x) << setprecision(0) << value << endl;




Reply With Quote