https://github.com/ozzies-code/calcaccumdeprec
C program that calculates Accumulated Depreciation
https://github.com/ozzies-code/calcaccumdeprec
Last synced: 10 months ago
JSON representation
C program that calculates Accumulated Depreciation
- Host: GitHub
- URL: https://github.com/ozzies-code/calcaccumdeprec
- Owner: ozzies-code
- Created: 2023-06-05T19:29:01.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-05T19:38:20.000Z (about 3 years ago)
- Last Synced: 2025-06-12T23:42:04.271Z (about 1 year ago)
- Language: C
- Size: 478 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# calcAccumDeprec
C program that calculates Accumulated Depreciation
#include
#include
int main(int argc, char *argv[])
{
double Coste, Deprec,
Valor_Recuperacion,
Valor_Actual,
Acumulado,
Valor_Anual;
int Anio, Vida_Util;
puts("Introduzca coste, valor recuperacion y vida util");
scanf("%1f %1f %d", &Coste, &Valor_Recuperacion, &Vida_Util);
puts("Introduzca Anio Actual");
scanf("%d", &Anio);
Valor_Actual = Coste;
Deprec = (Coste-Valor_Recuperacion)/Vida_Util;
Acumulado = 0;
puts("Anio Depreciacion Deprec. Acumulada");
while(Anio < Vida_Util)
{
Acumulado = Acumulado + Deprec;
Valor_Actual = Valor_Actual - Deprec;
printf("Anio: %d, Depreciacion:%.21f, %.21f Acumulada", Anio, Deprec, Acumulado);
Anio = Anio + 1;
}
system("PAUSE");
return 0;
}