Answer:
//Room rent
#include<iostream>
using namespace std;
int main()
{
double rent, sales, dis = 0;
int num, days;
double room_rent, total_rent,sales_tax;
cout<<"Enter the rent of one room: ";
cin>>rent;
cout<<"Enter the number of rooms to be booked: ";
cin>>num;
cout<<"Enter the number of days for which rooms need to be booked: ";
cin>>days;
cout<<"Enter the sales tax (in %): ";
cin>>sales;
if(num>=30)
dis = 0.3;
else if(num>=20)
dis = 0.2;
else if(num>=10)
dis = 0.1;
if(days>=3)
dis += 0.05;
total_rent = rent*num*days*(1-dis);
room_rent = total_rent/num;
cout<<"The cost of renting one room is "<<room_rent<<endl;
cout<<"The discount given is "<<100*dis<< "%.\n";
cout<<"The number of rooms booked is "<<num<<endl;
cout<<"The number of days rooms booked is "<<days<<endl;
cout<<"Total cost of the rooms = "<<total_rent<<endl;
sales_tax = (sales*total_rent)/100;
cout<<"Sales tax = "<<sales_tax<<endl;
cout<<"Total bill = "<<total_rent + sales_tax<<endl;
return 0;
}//end of main function
Explanation: