Calculation of depreciation , by using Written Down Value ( WDV ) as well as Straight Line Method ( SLM ).
Enter cost, rate of depreciation and number of years. Display depreciation for each year by WDV method as well as by Straight Line Method.
#include< #include< void main( ) { float cost, rate, year, slmdep, wdvdep, cnt; clrscr( ); printf("Enter Cost, Dep.Rate, Years"); scanf("%f %f %f", &cost, &rate, &year); slmdep = cost*rate/100; for (cnt=1; cnt < = year; cnt++) { wdvdep = cost*rate/100; cost = cost - wdvdep; printf("\n Year %f, WDV Dep %.2f, SLM Dep %.2f\n", cnt, wdvdep,slmdep); } getch( ); } |
---|
0 comments:
Post a Comment