new to stack overflow and c++
std::cout << std::fixed << "Starting Balance: $" << std::setprecision(2) << startbal << endl;
std::cout<< "Annual Interest Rate: " << intrestrate << endl;
std::cout << std::fixed << "Monthly Payment: $" << std::setprecision(2) <<monthlypay << endl;
Here I am trying to print from an array that I have, its printing mostly correct but I need the second line to not be affected by the setprecision so that the Annual Interest Rate will not be changed.
when printed I get:
Starting Balance: $1000.00
Annual Interest Rate: 0.05
Monthly Payment: $120.00
But i need it to stop rounding the Annual Interest Rate as it is supposed to be .055. Thanks for any help ahead of time!