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
Hello, I want to develop one crystal report. I have one database which has 5 field.One is string and others are Boolean. String field name is State and Four remaining fields are Th

Explain the difference between an ADO.NET Dataset and an ADO Recordset. The two main basic differences between recordset and dataset are as shown below :- 1) With the datase

Explain the different services provided by DLR to CLR. The services given by DLR to CLR are used for supporting dynamic languages. These services include the following: Exp

Write a C# program (C# console application) that plays a word game with the user. The program should ask the user to enter the following: • His or her name • His or her age

Describe session handling in a web farm, how does it work and what are the limits ?    In ASP.NET there are three ways to manage session objects. One support the in-proc mechani

I need Professional TELERIK WinForm Project Description: Professional TELERIK Professional assistance in  TELERIK WinForm via remote control. Development WinForm in C #

How does CAS works? There are two key methods of CAS security policy- code groups and permissions. A code group contains assemblies in it in a manner that each .NET assembly is

When we create a private constructor, we can not create object of the class directly from the client. So you will use the private constructors whenever you do not want instances of

How to use ActiveX Control in .Net ? ActiveX control is a special type of COM component  that supports a User Interface. Using ActiveX Control in your .Net Project is even

What is ACID fundamental? What are transactions in SQL SERVER? The transaction is a sequence of operations performed as a single logical unit of work..The logical unit of work