3. ??Create a program that will Use functions to get user input for? Price per pounds of an item ? float getP
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
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
