write a program that asks the user to enter today's sales rounded to the nearest $100 for each of three stores. the program should then display a bar graph comparing each store's sales. create each bar in the graph by displaying a row of astericks. each asterick should represent $00 of sales. in c++

To create a program that asks the user to input sales data and displays a bar graph in C++, you can follow these steps:

Step 1: Include necessary libraries
```cpp
#include <iostream>
using namespace std;
```
Step 2: Define a constant for the width of each bar (you can adjust this as per your preference).
```cpp
const int BAR_WIDTH = 100;
```
Step 3: Create a function to display the bar graph. This function takes the store number and the total sales as arguments and displays the corresponding bar.
```cpp
void displayBar(int storeNumber, int sales) {
cout << "Store " << storeNumber << ": ";
int barLength = sales / 100; // Calculate the number of asterisks
for (int i = 0; i < barLength; i++) {
cout << "*";
}
cout << endl;
}
```
Step 4: Create the main function to drive the program.
```cpp
int main() {
// Declare variables to track sales for each store
int store1Sales, store2Sales, store3Sales;

// Prompt the user to enter sales for each store
cout << "Enter today's sales for Store 1 (rounded to the nearest $100): ";
cin >> store1Sales;

cout << "Enter today's sales for Store 2 (rounded to the nearest $100): ";
cin >> store2Sales;

cout << "Enter today's sales for Store 3 (rounded to the nearest $100): ";
cin >> store3Sales;

// Display bar graph for each store
cout << endl;
displayBar(1, store1Sales);
displayBar(2, store2Sales);
displayBar(3, store3Sales);

return 0;
}
```
In the code above, we define a function `displayBar` that takes the store number and sales as arguments. It then calculates the width of the bar by dividing the sales by 100 (since every asterisk represents $100). The asterisks are then displayed using a loop, and a newline character is added to move to the next line.

In the `main` function, we declare variables to store the sales for each store and use `cin` to read the input from the user. After that, we call the `displayBar` function for each store to show the corresponding bar in the graph.

Note: This code assumes that the user will input valid integer values for sales. Error handling has not been implemented in this example.