Write a program that asks the user to enter today’s sales for five stores. The program should display a bar chart comparing each store’s sales. Create each bar in the bar chart by displaying a row of asterisks. Each asterisk should represent $100 of sales.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
can you plz make it util.scanner form and can you make it so i can copy and past it plz
thank you in advanced
Write a program that asks the user to enter today’s sales for five stores. The program should
display a bar chart comparing each store’s sales. Create each bar in the bar chart by displaying
a row of asterisks. Each asterisk should represent $100 of sales. Here is an example of
the program’s output:
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
Store 1: **********
Store 2: ************
Store 3: ******************
Store 4: ********
Store 5: *******************
- Start
- Declare an array to store sales of 5 stores
- Input sales
- For each sale in array
- Divide sale by 100 and store in n
- I from 1 to n
- Print *
- Stop
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images