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

  Console.ReadLine();  

 }

}

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
Explain the fundamental of connection pooling. Whenever a connection is opened first time a connection pool is created and is based on the exact match of the connection string

Assembly: 1) Assembly is a unit of deployment such as EXE or a DLL. 2) An assembly consists one or more files (dlls, exe's, html files etc.),& represents a group of resources,

Can we run DOT.NET in UNIX platform? One of the drawbacks of using Visual Studio.NET and the .NET framework to develop applications has been the lack of cross-platform support.

Explain the concept of destructor? A destructor is a special method for a class and is requested automatically when an object is finally destroyed. The name of the destructor i

How can we use Culture Auto in project? We will make a very simple login screen which we will try to use for English as well as the Greek. The login screen will display Engl

how can we use entity framework in ASP.Net MVC

As its name suggests, the website builder must be a desktop application that will allow users to simply create websites. Essentially, the program will have to give the users with a

How can you use Hidden frames to cache client data? This technique is implemented by developing a Hidden frame in page which will have your data to be cached. T cols="100

Delay signing During the development process you  need strong keys name  to be exposed to the developer which is not a good practice from security aspect .In such situations yo

What is an object? They are instance of classes. It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Attributes and behavior of