PROGRAMMING
3. Create a program that will
Use functions to get user input for
Price per pounds of an item – float getPrice();
No of pounds orderedint getPounds();
Calculate shippingfloat calcShipping()
Make sure that the user did not input a negative number
Calculate the total cost of the items ordered
Calculate shipping based upon the following conditions
< 10 lbs. $15.00
Between 10 and 20lbs. $12.50
More than 20 lbs. $10.00
If customer orders more than 25 lbs, a 10% discount is given on the cost of the items (not the shipping)
SAVE AS midtermprogram3.cpp
----------------------------------------------------
4. Write a while loop that loops 10 times and does the following. (Make sure to use a constant)
Squares the loop index and then adds one half of the index. Be careful of integer division
Calculates and displays both the total and the average.
SAVE AS midtermprogram4.cpp
---------------------------------
5. Bank ChargesA bank charges $10 per month plus the following check fees for a commercial checking account:
$.10 each for fewer than 20 checks
$.08 each for 20–39 checks
$.06 each for 40–59 checks
$.04 each for 60 or more checks
The bank also charges an extra $15 if the balance of the account falls below $400 (before any check fees are applied). Write a program that asks for the beginning balance and the number of checks written. Compute and display the bank’s service fees for the month.Input Validation: Do not accept a negative value for the number of checks written. If a negative value is given for the beginning balance, display an urgent message indicating the account is overdrawn.
SAVE AS midtermprogram5.cpp
5 years ago
30
Purchase the answer to view it

- solution.zip
- short assignment 250 words
- Need help with ENG315
- ergonomics
- INTERMEDIATE MICROECONOMICS
- A+ Paper
- Concious memories of emotionally stressful events are especially likely to be faciliated by activation of the ... A. Hypothalamus B. Amygdala C. Basil...
- Diversity study case
- Labor questions
- .
- Security measures in healthcare