Java Reference
In-Depth Information
of 4 inches in radius, by removing a sector of length x (see Figure 5-6). By
closing the remaining part of the circle, a conical cup is made. Your objective
is to remove the sector so that the cup is of maximum volume.
x
r
4
h
4
5
FIGURE 5-6 Conical paper cup
Write a program that prompts the user to enter the radius of the circular
waxed paper. The program should then output the length of the removed
sector so that the resulting cup is of maximum volume. Calculate your
answer to two decimal places.
27. A real estate office handles 50 apartment units. When the rent is $600 per
month, all the units are occupied. However, for each $40 increase in rent,
one unit becomes vacant. 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 number of apartment units
b. The rent to occupy all the units
c. The increase in rent that results in a vacant unit
d. Amount to maintain a rented unit
The program then outputs the number of units to be rented to maximize
the profit.
Search WWH ::




Custom Search