A real estate office handles, say, 50 apartment units. Whenthe rent is say, $600
ID: 3617763 • Letter: A
Question
A real estate office handles, say, 50 apartment units. Whenthe rent is say, $600 per month, all the units are occupied.However, for each, say, $40 increase in rent, one unit becomesvacant. Moreover, each occupied unit requires an average of $27 permonth for maintenance. How many units should be rented to maximizethe profit? Write a program that promps the user to enter a) the rent occupy in all units b) theincrease in rent tha results in a vacant unit c) amount to maintain a rented unit The program then outputs the number of units to be rented tomaximize the profit. also the input is to be from a file, and output to a file.Output consists of a table showing Numbe of unitsrented Monthly Rent Monthly profit with 50lines, the first line showing 50 units rented, the nextline showing 49, and so on. At the end of the tabl, an output statement tells Maximum profit of $-------------occurs when------units arerented A real estate office handles, say, 50 apartment units. Whenthe rent is say, $600 per month, all the units are occupied.However, for each, say, $40 increase in rent, one unit becomesvacant. Moreover, each occupied unit requires an average of $27 permonth for maintenance. How many units should be rented to maximizethe profit? Write a program that promps the user to enter a) the rent occupy in all units b) theincrease in rent tha results in a vacant unit c) amount to maintain a rented unit The program then outputs the number of units to be rented tomaximize the profit. also the input is to be from a file, and output to a file.Output consists of a table showing Numbe of unitsrented Monthly Rent Monthly profit with 50lines, the first line showing 50 units rented, the nextline showing 49, and so on. At the end of the tabl, an output statement tells Maximum profit of $-------------occurs when------units arerentedExplanation / Answer
please rate - thanks #include #include using namespace std; int main() {int i,apts=50; double rent,inc,maint,max=0,totrent,month,maxapts; ifstream in; ofstream out; in.open("input.txt"); if(in.fail()) {coutrent; in>>inc; in>>maint; outRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.