# 1.You have the final sales figures for the fourquarters in 2010 for Bennet’s Used Auto Sales, and you are to design a programthat asks for the sales figures, computes the total sales for the year,...

1.You have the final sales figures for the fourquarters in 2010 for Bennet’s Used Auto Sales, and you are to design a programthat asks for the sales figures, computes the total sales for the year, andcalculates and displays the average quarterly sales for the year.

2.You’ve been asked to write a program thatcomputes percentages for specific categories in a personal budget. The programshould ask the user to enter estimated monthly expenditures for the followingcategories:

Rent Payment, Food, Utilities,and All Other. Your program should add the amounts, display the total, andcompute and display the percentage for each category. Dollar amounts should bedisplayed with two decimal places and percentages should be displayed with onedecimal place.

3.The manager of Guaranteed Gaskets has discovereda leak in the warehouse attic. It’s raining, so he has placed a 25-liter bucketunder the leak to catch the rain. He wants you to draw a flowchart for aprogram to keep track of the amount of rain accumulated in the bucket as longas it’s raining.

Every 10 minutes, you’re to checkthe water level in the bucket and record it in the program. If the level is 20liters or higher, the program should display a message reminding you to emptythe bucket and put it back. Otherwise, the program should display a messagereminding you to come back in 10 minutes and run the program again.

Draw a flowchart for a program todisplay different messages based on the water level in the bucket.

4.Design a complete algorithm or draw a flowchartthat determines the sales tax on purchases under \$1.00 for a state with a 7%sales tax rate. Display the sales tax amount if the number of cents entered was99 or less; otherwise, display an error message.

Instead of multiplying the amountof the sale by 7% and rounding, use the following list to determine the exactamount of sales tax:

-0 to 7cents:no tax

-8 to 21cents:1 cent tax

-22 to 35cents: 2 cents tax

-36 to 49cents: 3 cents tax

-50 to 64cents: 4 cents tax

-65 to 78cents: 5 cents tax

-79 to 92cents: 6 cents tax

-93 to 99cents: 7 cents tax

.

5.Beforeyour boss allows adjustable thermostats in the office suite, he must beconvinced that major temperature variations occur in different offices andwithin each office on different days. You’re to write a program that allowseach employee to enter the temperature at noon on each of five days anddisplays the highest, lowest, and average (mean) temperatures.

Draw a flowchart to accept fivedaily temperature readings and displays the highest, lowest, and average (mean)temperatures. Use a For loop to take the five readings. (Hint:Initialize the highestand lowest temperature variable to the first temperature that’s read, and thencompare other temperatures to see whether they’re lower or higher.)

## Solution

Robert answered on Dec 20 2021
2)
Input total
number of
expenditures to
n
For i=1 to n input
values in a
ay at i
For i=1 to n
Cacluclate
total+=a
ay of i
Calculate
(a
ay[i]/total)*00
Print
percentage
in float
3)
While i not equal to
10 secs
If level>=20
Print
Empty
ucket
Print...
SOLUTION.PDF