Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main() {
- double budget;
- cin >> budget;
- string season;
- cin >> season;
- string modelCar = "Jeep";
- string classCar = "Luxury";
- if (budget <= 100) {
- if (season == "Summer") {
- modelCar = "Cabrio";
- budget *= 0.35;
- }
- else {
- budget *= 0.65;
- }
- classCar = "Economy class";
- }
- else if (budget <= 500) {
- if (season == "Summer") {
- modelCar = "Cabrio";
- budget *= 0.45;
- }
- else {
- budget *= 0.80;
- }
- classCar = "Compact class";
- }
- else {
- classCar = "Luxury class";
- budget *= 0.90;
- }
- cout << (classCar) << endl;
- cout << modelCar << " - " << fixed << setprecision(2) << budget << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement