#include<conio.h>
#include<stdio.h>
void main()
{
float sv,pv,dep;
int yos;
clrscr();
printf("Enter the value of 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);
getch();
}
****************************** OUTPUT *********************************
Enter the value of purchase value :- 800
Enter the year of service :- 200
Enter the value of depreation :- 2
The salvage value equal to :- 400.000000
************************************************************************