Write a program that asks the user to enter daily sale for five stores and record them in an array. The program should then display a bar graph comparing each store’s sales for all days of a week. Create each bar in the bar graph by displaying a row of asterisks. Each asterisk should represent Rs.1000 of sales. The program also calculates the total sale each day, and total sale of the week. Here is an example of the program s output. Enter day 1 sales for store 1: 4000 [Enter] Enter day 1 sales for store 2: 6000 [Enter] Enter day 1 sales for store 3: 10000 [Enter] Enter day 1 sales for store 4: 11000 [Enter] Enter day 1 sales for store 5: 3000 [Enter] Enter day 2 sales for store 1: 9000 [Enter] Enter day 2 sales for store 2: 8000 [Enter] Enter day 2 sales for store 3: 19000 [Enter] Enter day 2 sales for store 4: 7000 [Enter] Enter day 2 sales for store 5: 9000 [Enter] …(and so on.)
C++ language
Write a
The program should then display a bar graph comparing each store’s sales for all days of a week.
Create each bar in the bar graph by displaying a row of asterisks. Each asterisk should represent
Rs.1000 of sales. The program also calculates the total sale each day, and total sale of the week.
Here is an example of the program s output.
Enter day 1 sales for store 1: 4000 [Enter]
Enter day 1 sales for store 2: 6000 [Enter]
Enter day 1 sales for store 3: 10000 [Enter]
Enter day 1 sales for store 4: 11000 [Enter]
Enter day 1 sales for store 5: 3000 [Enter]
Enter day 2 sales for store 1: 9000 [Enter]
Enter day 2 sales for store 2: 8000 [Enter]
Enter day 2 sales for store 3: 19000 [Enter]
Enter day 2 sales for store 4: 7000 [Enter]
Enter day 2 sales for store 5: 9000 [Enter]
…(and so on.)
Weekly Sale
Monday: Total Sale: 34,000/-
Store 1: **** (4000)
Store 2: ****** (6000)
Store 3: ********** (10000)
Store 4: *********** (11000)
Store 5: *** (3000)
Tuesday: Total Sale: 52,000/-
Store 1: ********* (9000)
Store 2: ******** (8000)
Store 3: ******************* (19000)
Store 4: ******* (7000)
Store 5: ********* (9000)
…(and so on.)
Total Sale This Week: 123,456/-
![Q3. A person has 5 electronic stores in a Kohat city. He records the daily sale by each store at the end of each
day, for seven days of a week (Mondy, Tuesday,..., Sunday). Thus, at the end of a week he has the following
data:
[0]
4000
[1]
6000
| [2]
10000
[3]
11000
[4]
3000
[0]
|1]
9000
8000
19000
7000
9000
...
16]
15000
3000
11000
2000
2000](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F557e7434-d2f3-487c-ae63-e7b32640420f%2F4ed1eb9f-aa35-4904-9122-3edc4bbb4eab%2Fiy28dha_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)