Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Holidays.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <iomanip>
- using namespace std;
- int main()
- {
- double budget;
- string season;
- cin >> budget >> season;
- string location = " ";
- string place = " ";
- if (budget <= 1000)
- {
- place = "Camp";
- if (season == "Summer")
- {
- location = "Alaska";
- budget *= 0.65;
- }
- else if (season == "Winter")
- {
- location = "Morocco";
- budget *= 0.45;
- }
- }
- else if (budget > 1000 && budget <= 3000)
- {
- place = "Hut";
- if (season == "Summer")
- {
- location = "Alaska";
- budget *= 0.8;
- }
- else if (season == "Winter")
- {
- location = "Morocco";
- budget *= 0.6;
- }
- }
- else if (budget > 3000)
- {
- place = "Hotel";
- if (season == "Summer")
- {
- location = "Alaska";
- budget *= 0.9;
- }
- else if (season == "Winter")
- {
- location = "Morocco";
- budget *= 0.9;
- }
- }
- cout << location << " - " << place << " - "
- << fixed << setprecision(2) << budget << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement