When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
9 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
Welcome to Together C & C++ 👋
We won't do your homework for you (#rules) but we are happy to help you learn and point you in the right direction.
Please send what you have so far and ask a specific question.
sound like and homework / assignment !
!code
```cpp
int main() {}
```
int main() {} ```
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
const double SALES_TAX_RATE = 0.0825; // Current sales tax rate in Riverside, CA
double total_sales;
// Prompt the user to enter the total sales
cout << "Enter the total sales: $";
cin >> total_sales;
// Calculate the sales tax and the total with the sales tax included
double sales_tax = total_sales * SALES_TAX_RATE;
double total_with_tax = total_sales + sales_tax;
// Output the results using the standard notation for money
cout << fixed << setprecision(2);
cout << "Sales tax charged: $" << sales_tax << endl;
cout << "Total with sales tax: $" << total_with_tax << endl;
return 0;
}
@vestal garden Has your question been resolved? If so, run !solved :)