I cant get the 2nd and 3rd if statements to work, only the presidental one displays. help?????
#include <iostream> // Provides cin, cout, endl
#include <string> // Provides string class
using namespace std; // Provides standard library
//Function Prototypes
string getRoomType();
int askRoomNights();
double findRoomRate(string type);
void displayBill(string type, int &nights, double &roomRate, double &totalBill);
int main()
{
string type = ""; // Input - Room Type
int nights = 0; // Input - Number of nights
double roomRate = 0; // Processing - daily Room Rate
double totalBill = 0; // Output - total room bill
type = getRoomType(); // Ask user for room type
nights = askRoomNights(); // Ask user for number of nights
roomRate = findRoomRate(type); // Determine Room Rate
totalBill = nights * roomRate; // Calculate total bill
displayBill (type, nights, roomRate, totalBill);
return 0;
} // end main
void displayBill(string type, int &nights, double &roomRate, double &totalBill)
{
cout << "HOTEL BILL" << endl;
cout << type << " room for " << nights << " nights" << endl;
cout << "daily rate =" << roomRate << " total bill is " << totalBill << endl;
}
string getRoomType()
{
string type = "";
cout << "Enter desired Room Type(Presidential, Honeymoon or Regular) " << endl;
cin >> type;
return type;
}
int askRoomNights()
{
int nights = 0;
cout << "Entered desired number of nights" << endl;
cin >> nights;
return nights;
}
double findRoomRate(string type)
{
double roomRate = 0;
int nights = 0;
double totalBill = 0;
if ("Presidential")
roomRate = 695.00;
else if ("Honeymoon")
roomRate = 295.00;
else if ("Regular")
roomRate = 79.00;
else
roomRate = 0;
return roomRate;
}