For Advertisements on this blog Contact Us at developgram@gmail.com or +91-9923438816

Simple Programming Tutorials For Beginners

Sunday, December 11, 2016

Depreciation Calculation

/*
Summary: Compute the yearly depreciation of the value of an item, given by Depreciation = (PURCHASE VALUE - SALVAGE VALUE) / YEAR OF SERVICE
*/

#include<conio.h>
#include<stdio.h>
int main()
{
 float sv,pv,dep;
 int yos;

 printf("Enter the purchase value :- ");
 scanf("%f",&pv);

 printf("Enter the year of service :- ");
 scanf("%d",&yos);

 printf("Enter the value of depreation :- ");
 scanf("%f",&dep);


 sv = pv - (dep * yos);
 printf("\n The salvage value equal to :- %f",sv);

 return 0;
}

No comments:

Post a Comment

SEARCH THIS BLOG