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
Define an event. Whenever an action takes place in a class, that class gives a notification to other classes or objects that are assigned to perform certain tasks. These notifi

I want a C# school project Project Description: The project is made in C# and haves a database connection. We have some small problems asking up data from the database.

Project Description: i want to prepare a pollution checking software.. i have a demo of it.. Exactly someone to be created ..some changes to be included.. sms gateway t

cookieless="false" timeout="20" /> Above is sample session state mode specified for SQL SERVER.

#question.cookies working with data.

Question: (a) Give three key differences between the DetailsView and FormView controls. (b) The ASP.NET 2.0 Framework introduces the idea of validation groups. How Valida

Name the classes that are introduced in the System.Numerics namespace. The following two new classes are introduced in the System.Numerics namespace:  BigInteger - Refers

What is a Link? At the lowest level, a network can have of two or more computers directly linked by some physical medium such as coaxial cable or optical fiber. Such a physical

Explain Dataset Accept Changes and Data Adapter Update methods?  Data Adapter Update method Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated

Develop PC Cleaner Software Project Description: We are seeking experienced developer who can develop Registry Cleaner / PC Cleaner software for us. Software should be like c