-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconst_main.cpp
More file actions
45 lines (30 loc) · 1.49 KB
/
const_main.cpp
File metadata and controls
45 lines (30 loc) · 1.49 KB
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
#include <iostream>
using namespace std;
int main() {
cout << "Hello, welcome to Raghav's Carpet Cleaning Service" << endl;
int small_rooms{ 0 };
cout << "\nHow many small rooms would you like cleaned? ";
cin >> small_rooms;
int large_rooms{ 0 };
cout << "How many large rooms would you like cleaned? ";
cin >> large_rooms;
const double price_per_small_room{ 25.0 };
const double price_per_large_room{ 35.0 };
const double sales_tax{ 0.06 };//6 % tax
const int estimate_expiry{ 30 }; // days
cout << "\nEstimate for carpet cleaning service" << endl;
cout << "Number of small rooms: " << small_rooms << endl;
cout << "Number of large rooms: " << large_rooms << endl;
cout << "Price per small room: $" << price_per_small_room << endl;
cout << "Price per large room: $" << price_per_large_room << endl;
cout << "Cost : $"
<< (price_per_small_room * small_rooms) + (price_per_large_room * large_rooms) << endl;
cout << "Tax: $"
<< ((price_per_small_room * small_rooms) + (price_per_large_room * large_rooms)) * sales_tax << endl;
cout << "===============================" << endl;
cout << "Total estimate: $"
<< ((price_per_small_room * small_rooms) + (price_per_large_room * large_rooms)) + (((price_per_small_room * small_rooms) + (price_per_large_room * large_rooms)) * sales_tax) << endl;
cout << "This estimate is valid for " << estimate_expiry << " days" << endl;
cout << endl;
return 0;
}