# programming

posted by
**tina** on
.

3. Your company needs to depreciate its assets. The accountant wants to record the purchase price, the useful life, and the estimated salvage value. Your program should be able to depreciate by the straight-line method.

For example, a computer system was purchased for $25,000. The computer system has a useful life of 5 years, and will be sold for an estimated salvage value of $10,000. The amount to be depreciated is therefore $15,000. (Purchase price minus salvage price.)

The straight-line method divides the depreciation amount by the years of depreciation to determine the annual depreciation. In this example, depreciation would be $3000 per year. (15000/5 years).