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).

To calculate depreciation using the straight-line method, you need to follow these steps:

1. Determine the purchase price of the asset: In this example, the computer system was purchased for $25,000.

2. Determine the estimated salvage value: The estimated salvage value is the expected value of the asset at the end of its useful life. In this example, the salvage value is $10,000.

3. Calculate the depreciation amount: Subtract the estimated salvage value from the purchase price. In this case, the depreciation amount is $15,000 ($25,000 - $10,000).

4. Determine the useful life of the asset: The useful life is the number of years over which the asset is expected to generate value. In this example, the useful life of the computer system is 5 years.

5. Calculate the annual depreciation: Divide the depreciation amount by the number of years of useful life. In this case, the annual depreciation would be $3,000 ($15,000 / 5 years).

By following these steps, you can determine the annual depreciation using the straight-line method.

If you're looking to program a solution for calculating depreciation by the straight-line method, you can create a function or program that prompts the user for the necessary inputs (purchase price, useful life, and estimated salvage value), performs the calculations, and outputs the annual depreciation amount.