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
What is LOCK escalation? The Lock escalation is the process of converting of the low level locks (such as row locks, page locks) into the higher level locks (such as table lock

I need a Web Application UI Modernization - Preliminary Technology Assessment We are seeking to overhaul a 10-year old enterprise application, CRM-related as well as web-based t

Connect a Software Application to a Database Backend Acquire the knowledge and develop the skills needed to prototype an end user application using a rapid application dev

What is the purpose of DOTNET? Dot Net Is a collection of products like C#, ASp.Net, Vb.Net, XML. The purpose of .Net is that we can simply upgrade and degrade our programs whi

I have the project that takes screen shots and saves in the specific folder.(eg.Screen0001) but the problem is that if i close application and run it again then it replace the exis

Design the following interface and add code to the command buttons to achieve the following using case statement. I) find coursework to be calculated using the following formula:-0

How can you increase SQL performance? 1)Keep your indexes as narrow as possible. This reduces the size of the index and decrease the number of reads needed to read the index.

What is Multi-threading? Multi-threading process forms the subset of Multi-tasking. Inspite of having to switch between programs this feature switches between different parts o

What' is the sequence in which ASP.NET events are processed? The sequence in which the ASP.NET events occur are as folows :- 1.     Page_Init. 2.     Page_Load. 3.