A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant.
Moreover, each occupied unit requires an average of $27 per month for maintenance.
How many units should be rented to maximize the profit? Write a program that prompts the user to enter:
a. The rent to occupy all the units.
b. The increase in rent that results in a vacant unit.
c. Amount to maintain a rented unit.
The program then outputs the number of units to be rented to maximize the profit.