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
icon
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
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
steps

Step by step

Solved in 1 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning