I'm trying to round my final answer to 2 decimals so it is Dollars and Cents. I'm new to coding, and can't figure it out. I want to round "w" in the line that says "The amount you need to charge is" Here's my code:
#include <iostream>
using namespace std;
int main()
{
string Choice;
float x, w;
cout << "Please enter the amount needed." << endl;
cin >> x;
w = x/(1-0.0275);
cout << "The amount you need to charge is $"<< w << "." << endl;
return (0);
}