Advertisement
Spocoman

Sea Trip

Sep 23rd, 2023
823
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     double dayFoodPrice, daySouvenirPrice, dayHotelPrice;
  8.     cin >> dayFoodPrice >> daySouvenirPrice >> dayHotelPrice;
  9.  
  10.     double foodPrice = dayFoodPrice * 3;
  11.     double souvenirPrice = daySouvenirPrice * 3;
  12.     double hotelPrice = dayHotelPrice * 0.90 + dayHotelPrice * 0.85 + dayHotelPrice * 0.80;
  13.     double transportPrice = 210.0 * 2 / 100 * 7 * 1.85;
  14.  
  15.     printf("Money needed: %.2f\n", foodPrice + souvenirPrice + hotelPrice + transportPrice);
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement