I'm attempting to write a program that calculates the cost of renting rooms at a certain hotel. The program asks for the cost to rent, how many days the rooms are going to be booked, and the sales tax. I'm supposed to implement if statements in order calculate the discount given based off of the amount of time the rooms are rented and how rooms will be rented. When i try to set the parameters of what discount will be used, i keep getting an error saying "expected primary expression __" varying through each expression i use at lines 45 - 51.
#include <iostream>
using namespace std;
int main()
{
int Reason;
double Rent, totRent;
double SalesTax, calcST;
double TimeDiscount, totDiscount;
int numRooms;
int RentTime;
int tenRooms, twentyRooms, thirtyRooms;
int tenTotal, twentyTotal, thirtyTotal, RegularPricing;
cout << "How much is the cost of renting a room: " << endl;
cin >> Rent;
cout << "Are you staying for a special reason i.e. wedding/conference: " << endl;
cin >> Reason;
cout << "How many days are the rooms going to be booked " << endl;
cin >> RentTime;
cout << "What is the sales tax: " << endl;
cin >> SalesTax;
SalesTax = Rent * SalesTax;
calcST = Rent + SalesTax;
totRent = (Rent * numRooms) + RentTime;
if (Reason = 1)
{
cout << "How many are rooms going to be booked: " << endl;
cin >> numRooms;
}
if (RentTime >= 3)
{
TimeDiscount = .05 * Rent;
totDiscount = Rent + TimeDiscount;
}
if (numRooms >= 10)
{
tenRooms = Rent * .10;
tenTotal = (totRent + calcST) - (tenRooms + totDiscount);
cout << "Your total fee is: $" << tenTotal << endl;
}
if (numRooms >= 11 && <= 20) //45
{
twentyRooms = Rent * .20 * SalesTax * TimeDiscount;
twentyTotal = (totRent + calcST) - (twentyRooms + totDiscount);
cout << "Your total fee is: $" << twentyTotal << endl;
}
if (numRooms >= 21 && >= 30 && >> 30) //51
{
thirtyRooms = Rent * .30 + SalesTax + TimeDiscount;
thirtyTotal = (totRent + calcST) - (thirtyRooms + totDiscount);
cout << "Your total fee is: $" << thirtyRooms << endl;
}
else
{
RegularPricing = Rent * RentTime + SalesTax;
cout << "Your Total Fee is: $" << RegularPricing << endl;
}
cout << "The cost of renting one room is: $" << Rent << endl;
cout << "Number of rooms booked : " << numRooms << endl;
cout << "Days booked: " << RentTime << endl;
cout << "The sales tax is: $" << calcST << endl;
return 0;
}