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.)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C++ language

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.)
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
Transcribed Image Text: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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY