Write a C++ program that asks the user to entry today's sales for five stores. The program should then display a bar graph comparing each store's sales. Create each bar in the bar graph by displaying a row of asterisks. Each asterisk should represent $100 dollars in sales. NOTE: You must use at least one or more of the repetitive loops discussed in lecture. Review the sample run below! $ ./a.out Enter today's sales for store 1 : 1000 Enter today's sales for store 2 : 1200 Enter today's sales for store 3 : 1800 Enter today's sales for store 4 : 800 Enter today's sales for store 5 : 1900 SALES BAR CHART (Each * = $100) Store 1 : Store 2 : Store 3 : Store 4 : ******** Store 5 : Store #23 5 had the highest: 1900 Total for all stores was : 6700
Write a C++ program that asks the user to entry today's sales for five stores. The program should then display a bar graph comparing each store's sales. Create each bar in the bar graph by displaying a row of asterisks. Each asterisk should represent $100 dollars in sales. NOTE: You must use at least one or more of the repetitive loops discussed in lecture. Review the sample run below! $ ./a.out Enter today's sales for store 1 : 1000 Enter today's sales for store 2 : 1200 Enter today's sales for store 3 : 1800 Enter today's sales for store 4 : 800 Enter today's sales for store 5 : 1900 SALES BAR CHART (Each * = $100) Store 1 : Store 2 : Store 3 : Store 4 : ******** Store 5 : Store #23 5 had the highest: 1900 Total for all stores was : 6700
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
Related questions
Question
![Write a C++ program that asks the user to entry today's sales for five stores. The
program should then display a bar graph comparing each store's sales. Create each bar in
the bar graph by displaying a row of asterisks. Each asterisk should represent $100 dollars
in sales.
NOTE: You must use at least one or more of the repetitive loops discussed in lecture.
Review the sample run below!
$ ./a.out
Enter today's sales for store 1 : 1000 <Enter>
Enter today's sales for store 2 : 1200 <Enter>
Enter today's sales for store 3 : 1800 <Enter>
Enter today's sales for store 4 : 800 <Enter>
Enter today's sales for store 5 : 1900 <Enter>
SALES BAR CHART
(Each *
=
$100)
Store 1 :
Store 2 :
Store 3 :
Store 4 : ********
Store 5 :
Store #23 5 had the highest: 1900
Total for all stores was
: 6700](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff2d324e2-7a67-4e3d-bb22-9ad23fbeb72b%2Fca740157-8848-4e1f-93b6-6399177d29a5%2Fmbo3pbo_processed.png&w=3840&q=75)
Transcribed Image Text:Write a C++ program that asks the user to entry today's sales for five stores. The
program should then display a bar graph comparing each store's sales. Create each bar in
the bar graph by displaying a row of asterisks. Each asterisk should represent $100 dollars
in sales.
NOTE: You must use at least one or more of the repetitive loops discussed in lecture.
Review the sample run below!
$ ./a.out
Enter today's sales for store 1 : 1000 <Enter>
Enter today's sales for store 2 : 1200 <Enter>
Enter today's sales for store 3 : 1800 <Enter>
Enter today's sales for store 4 : 800 <Enter>
Enter today's sales for store 5 : 1900 <Enter>
SALES BAR CHART
(Each *
=
$100)
Store 1 :
Store 2 :
Store 3 :
Store 4 : ********
Store 5 :
Store #23 5 had the highest: 1900
Total for all stores was
: 6700
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 1 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,