the code for beginner . use ” condition statement” , loobs , void function , value return function, pass by value and pass by reference only if necessary.
2.
An apartment complex contains possibly 60 apartments, rented out at possibly $500, when the
apartment is at this rent price, it is fully occupied. Whenever there is an increase in the rent, possibly by $50,
one renter moves out, reducing the occupied units by 1. The apartment complex spends $25 dollars to maintain
each occupied unit. How many apartments should be rented to yield maximum profit for the complex. (Profit is
calculated by subtracting the rent made from all occupied units from the cost it takes to maintain them).
Your program should input from the main the
Initial number of apartments the complex has
The rent price that has every apartment occupied
Your program should input from the function
The increase in rent that results in an unoccupied apartment
The amount it takes to maintain each occupied apartment
Your program should output in the main the number of occupied apartments, it takes to yield maximum pro
along with the value of the profit.
app 40