Depreciation is the cost of value of an item offer a number of years from the time of purchase.
Another method of calculating depreciation is the straight line method. If value
is the purchase price of the item and it’s to be depreciated over n years, then value is the depreciated amount every year .Thus depreciation=value.
Write a C++ program that accept the number of years and then display the depreciated amount and the outstanding amount for the different years.
Year Value Depreciation Total Depreciation
1 5000 1000 1000
2 4000 1000 2000
3 3000 1000 3000
4 2000 1000 4000
5 1000 1000 5000