You can get the solution of your problem by using this code.
Program - Determining salvage value of an item
using System;
class depreciation
{
public static void Main()
{
float depreciation, PurchasePrice, Yrs, SalvageValue; string d,p,y;
// string variables are to store the values inputted in the console
// each string variable has its character as that of the corresponding
// starting character of float type variable
Console.Write("Enter the Depreciation : ");
d = Console.ReadLine();
depreciation = float.Parse(d);
Console.Write("Enter the PurchasePrice : ");
p = Console.ReadLine();
PurchasePrice = float.Parse(p);
Console.Write("Enter the Amount of Years : ");
y = Console.ReadLine();
Yrs = float.Parse(y);
SalvageValue = (float)(PurchasePrice - (depreciation * Yrs));
Console.WriteLine("SalvageValue = " + SalvageValue);
Console.ReadLine();
}
}