Tuesday
July 29, 2014

Homework Help: Computer Programming

Posted by Dom on Tuesday, July 9, 2013 at 8:49pm.

I'm trying to create a vba code that solves this problem: 50 apartment units rent for 600 a month, for each 40 dollar increase in rent a unit becomes unoccupied. I want to find the max profit and number of units at that number.

Sub Rent()
Dim Rent As Variant
Dim increase As Integer
Dim units As Object
Dim Profit As Double
Rent = InputBox("The rent to occupy all the units")
increase = InputBox("The increase in rent that results in a vacant unit")
Rent = Rent + increasea
units = 50
Profit = units * (600 + increase)

Outputbox " " & units & " units and " & Profit & " when profit is maximized."
End Sub

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Calculus-Applied Optimization Problem - The manager of a large apartment complex...
Calculus - The manager of a large apartment complex knows from experience that ...
Calculus - The manager of a large apartment complex knows from experience that ...
Calculus - The manager of a large apartment complex knows from experience that ...
Calculus - The manager of a large apartment complex knows from experience that ...
optimization - The manager of a large apartment complex knows from experience ...
calculus - The manager of a large apartment complex knows from experience that ...
Calculus Optimization - The manager of a large apartment complex knows from ...
Calc Help Please - The manager of a large apartment complex knows from ...
Calc - The manager of a large apartment complex knows from experience that 100 ...

Search
Members