Hotel room
#include <iostream>
using namespace std;
int main()
{
string month;
cin >> month;
double overnight;
cin >> overnight;
string typeOfRoom;
double rentStudio = 0;
double rentApartment = 0;
if(month == "May" || month == "October"){
rentStudio = overnight * 50;
rentApartment = overnight * 65;
if(overnight > 7 && overnight <= 14){
rentStudio = rentStudio - 0.05 * rentStudio;
}else if(overnight > 14 ){
rentStudio = rentStudio - 0.30 * rentStudio;
}
if(overnight > 14){
rentApartment = rentApartment - 0.10 * rentApartment;
}
}else if(month == "June" || month == "September"){
rentStudio = overnight * 75.20;
rentApartment = overnight * 68.70;
if(overnight > 14)
{
rentStudio = rentStudio - 0.20 * rentStudio;
}else if(overnight > 14 ){
rentApartment = rentApartment - 0.10 * rentApartment;
}
}else if(month == "July" || month == "August"){
rentStudio = overnight * 76;
rentApartment = overnight * 77;
if(overnight > 14)
{
rentApartment = rentApartment - 0.10 * rentApartment;
}
}
cout.setf(ios::fixed);
cout.precision(2);
cout << "Apartment: " << rentApartment << " lv." << endl;
cout << "Studio: " << rentStudio << " lv." << endl;
return 0;
}
Някъде има проблем обаче, него виждам от какво е моля за малко помощ.