The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Some of my information is not displaying correctly, can you look at my code and let me know what I am doing wrong. Below is the instructions. Sorry about yesterday.
In this project you will create a program that will calculate the total weekly sales for a company. You will be using two arrays to store the daily sales figures and the days of the week. Since you will be dealing with money you will need to use a double datatype. The program will prompt the user for the gross sales for each day of the week, Monday through Sunday. Here are some of the main variables you will need to create for the program:
Once you have gotten the daily sales numbers you will pass the dayWeek array to the following functions:
You should display:
The formula for calculating the tax is:
Tax = Total Weekly Sales * Sales Tax
The formula for calculating the net profit is:
Net Profit = Total Weekly Sales - Tax
Formatting the output: You will need to format all sales with a $ and 2 decimal points precision.
This project covers methods you have learned in chapters 2 through 8.
Program Output:
This program calculates total weekly sales.
Please enter the gross sales received on Monday: $100.00
Please enter the gross sales received on Tuesday: $125.33
Please enter the gross sales received on Wednesday: $625.53
Please enter the gross sales received on Thursday: $813.55
Please enter the gross sales received on Friday: $2358.41
Please enter the gross sales received on Saturday: $1664.88
Please enter the gross sales received on Sunday: $189.56
Total sales for the week: $5877.26
Total taxes withheld: $573.03
Net profit: $5304.23
Day with the highest sales amount was Friday with a sales total of $2358.41
Day with the lowest sales amount was Monday with a sales total of $100.00
Sales sorted from lowest to highest:
Monday had gross sales of $100.00
Tuesday had gross sales of $125.33
Sunday had gross sales of $189.56
Wednesday had gross sales of $625.53
Thursday had gross sales of $813.55
Saturday had gross sales of $1664.88
Friday had gross sales of $2358.41
Press any key to continue . . .
Attachments: