Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Mathematics ProgramRSS Feeds

Straight-line method of computing the yearly depreciation of the value of an item i.e DEPREATION = (PURCHASE VALUE - SALVAGE VALUE) / YEAR OF SERVICE

Posted By: Adalrich Fischer     Category: C Programming     Views: 13308

Program of a Straight-line method of computing the yearly depreciation of the value of an item i.e DEPREATION = (PURCHASE VALUE - SALVAGE VALUE) / YEAR OF SERVICE.

Code for Straight-line method of computing the yearly depreciation of the value of an item i.e DEPREATION = (PURCHASE VALUE - SALVAGE VALUE) / YEAR OF SERVICE in C Programming

#include<conio.h>
#include<stdio.h>
void main()
{
    float sv,pv,dep;
    int yos;
    clrscr();

    printf("Enter the value of purchase value :- ");
    scanf("%f",&pv);

    printf("Enter the year of service :- ");
    scanf("%d",&yos);

    printf("Enter the value of depreation :- ");
    scanf("%f",&dep);


    sv = pv - (dep * yos);
    printf("\n The salvage value equal to :- %f",sv);

    getch();
}

/*
*********
OUTPUT:
*********

Enter the value of year : 3

Enter the value of purchase price : 200

Enter the value of depriciation : 40

Salvage Value is : 80.000000
*/
  
Share: 



Adalrich Fischer
Adalrich Fischer author of Straight-line method of computing the yearly depreciation of the value of an item i.e DEPREATION = (PURCHASE VALUE - SALVAGE VALUE) / YEAR OF SERVICE is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!