Advertisement
Povak

Orçamento

Jul 20th, 2022
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.     cout << "Hello, welcome to Povak's cleaning service " << endl;
  8.     cout << "\nHow many small rooms would you like to be cleaned ? " << endl;
  9.  
  10.     int number_of_small_rooms{ 0 };
  11.     cin >> number_of_small_rooms;
  12.  
  13.     cout << "How many large rooms would you like to be cleaned ? " << endl;
  14.  
  15.     int number_of_large_rooms{ 0 };
  16.     cin >> number_of_large_rooms;
  17.  
  18.  
  19.     const double price_per_small_room{ 25.0 };
  20.     const double price_per_large_room{ 35.0 };
  21.     const double tax{ 0.06 };
  22.     const int quote_expiry{ 30 };
  23.  
  24.     cout << "Estimated price for full room cleaning service" << endl;
  25.     cout << "\nNumber of small rooms: " << number_of_small_rooms << endl;
  26.     cout << "Number of large rooms: " << number_of_large_rooms << endl;
  27.     cout << "Price per small room: $" << price_per_small_room << endl;
  28.     cout << "Price per large room: $" << price_per_large_room << endl;
  29.  
  30.     cout << "Cost: $"
  31.         << (price_per_small_room * number_of_small_rooms) +
  32.            (price_per_large_room * number_of_large_rooms)
  33.         << endl;
  34.  
  35.     cout << "Tax: " <<
  36.             ((price_per_small_room * number_of_small_rooms) +
  37.             (price_per_large_room * number_of_large_rooms) * tax) << endl;
  38.  
  39.     cout << "Total estimated: $" <<
  40.             ((price_per_small_room * number_of_small_rooms) + (price_per_small_room * number_of_small_rooms)) +
  41.             ((price_per_large_room * number_of_large_rooms) + (price_per_large_room * number_of_large_rooms)) * tax << endl;
  42.  
  43.     cout << "This quote is valid for: " << quote_expiry << " days." << endl;
  44.  
  45.     return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement