Determining salvage value of an item - c# program, DOT NET Programming

Determining salvage value of an item - C# Program

I am a learner of C# language and i am struggling with the programming functions in c#. Can you have any code examples for this.

Posted Date: 2/11/2013 7:19:45 AM | Location : United States

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);  




Posted by Alice | Posted Date: 2/11/2013 7:21:33 AM

Related Discussions:- Determining salvage value of an item - c# program, Assignment Help, Ask Question on Determining salvage value of an item - c# program, Get Answer, Expert's Help, Determining salvage value of an item - c# program Discussions

Write discussion on Determining salvage value of an item - c# program
Your posts are moderated
Related Questions
What are methods? Methods are the building blocks of a class, in which they are linked together to share and process data to produce the result. In other words, a method is a b

I need C# Programmer Project Description: To help in the production of a C# module to provide a web service. We are based in Littlehampton, West Sussex. Skills required ar

Custom Mql4 Code/Fxdreema block Project Description: I need the subsequent code written in mql4 and integrated as custom block(s) in fxdreema: for each trade: check pro

Develop a iPhone and Android mobile game Project Description: I am seeking a developer to create a mobile game for me. I need an endless runner game with simple controls. The

Required: An implementation of a two player game. Keep the game simple ROCK PAPER SCOSSORS A two player game, each player on a different browser instance.  (pro

.NET is Compile Time OR RunTime Environment?   .Net's framework has CLS,CTS and CLR.CTS checks declaration of types at the time when u write code and CLS defines some rules and

Explain the limitations of AJAX. The following are the limitations of AJAX: It is complex to bookmark a particular state of the application. Function given in the code-be

How many types of generations are there in a garbage collector? Memory management in the CLR is separated into three generations that are building up by grouping memory segment

What are the ways to implement locking in ADO.NET? There are many ways to implement locking using ADO.NET which are shown below:- 1)Whenever we call "Update" method of DataA

Project Description: Looking for an internal-use, Manufacturing/ ERP Website developed for use at a Paper Mill. Modules/areas would include Customers, Scheduling, Sales Orders,