• API
• FAQ
• Tools
• Archive
daily pastebin goal
84%
SHARE
TWEET

# Untitled

a guest Jun 19th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. //JosephEmersonHomework5Introductory11.cpp - Program calculates and displays
2. //the total amount the customer owes.
3. //Created/revised by Joseph Emerson on <October 4th, 2010
4.
5. #include <iostream>
6. #include <iomanip>
7. using namespace std;
8.
9. // declare functions
10. void description();
11. int getPounds();
12. double getPrice();
13. double getShipping();
15. double getTotal();
16.
17. int main()
18. {
19.     //declare variables
20.     double Shipping     = 15;
21.     int Pounds          = 0;
22.     double Price        = 0.0;
23.     char answer         = ' ';
24.     double totalPrice   = 0.0;
25.     description();
26.
27.     //enter input items
28.     Shipping= getShipping();
29.     Pounds= getPounds();
30.     Price= getPrice();
31.     totalPrice= getTotal();
32.     system("pause");
33.     return 0;
34. }   //end of main function
35.
36.     void description()
37. {
38.     cout << "This program displays the total amount the customer owes \n";
39. }
40.
41.     int getPounds()
42. {
43.     int Pounds ;
44.     cout << "Total Pounds: ";
45.     cin >> Pounds;
46.     return Pounds;
47. }
48.
49.     double getPrice()
50. {
51.     double Price ;
52.     cout << "Total Price Per Pound(s): ";
53.     cin >> Price;
54.     return Price;
55. }
56.
57.
58. double getShipping()
59. {
60.     double Shipping= 0 ;
61.     cout << "Do you want shipping? Y or N? : .";
65.     Shipping = 15;
66.     return Shipping;
67. }
68.
70. {