aboutsummaryrefslogtreecommitdiff
path: root/4b/5.10Programming/5.10Programming.cpp
blob: c12988a5b05a282fb3e5334ed03771ed5a2abc0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//********************************************************************
//* File: Chapter 5 PE 5_1.cpp
//* Have fun with these errors!
//********************************************************************/
#include <iostream>
using std::cout;
using std::cin;

int main()
{
    const double PRODUCTION_RATE = 1.15,
        PRE_PRODUCTION_RATE = 1.4,
        PRODUCERS_RATE = 1.25;

    double ProductionHours,
           PreProductionHours,
           ProducersHours,
           ProductionCost,
           PreProductionCost,
           ProducersCost,
           TotalCost;

    cout << "Enter Production Hours: ";
    cin >> ProductionHours;
    cout << "\nEnter Pre-Production Hours: ";
    cin >> PreProductionHours;

    cout << "\nEnter Producers Hours: ";
    cin >> ProducersHours;

    ProductionCost = ProductionHours * PRODUCTION_RATE;
    PreProductionCost = PreProductionHours * PRE_PRODUCTION_RATE;
    ProducersCost = ProducersHours * PRODUCERS_RATE;

    TotalCost = ProductionCost + PreProductionCost + ProducersCost;

    cout << "\n\t\tCar Dealership Bill\n";
    cout << "\n\nProduction Cost: ";
    cout << ProductionCost ;

    cout << "\n\nPre-Production Cost: ";
    cout << PreProductionCost;

    cout << "\n\nProducers Cost: ";
    cout << ProducersCost;

    cout << "\n\nWeekly Total Cost: ";
    cout << TotalCost << std::endl;

    return 0;
}