ref: del calc year

This commit is contained in:
Иван 2025-03-01 18:54:19 +03:00
parent a38c7c284f
commit d803766a42
3 changed files with 3 additions and 8 deletions

View File

@ -27,7 +27,7 @@ double calculating(double cost, double mod, double marg) {
}
// Функция amortization
double amortization(double a, double t, double spi, int year) {
double amortization(double a, double t, double spi) {
// количество минут в году
double minutes_in_year = 525600;

View File

@ -7,6 +7,6 @@
// Объявления функций
double cost_prise(double p, double t, double h, double md, double d, double st, double mk, double am, double post, int x);
double calculating(double cost, double mod, double marg);
double amortization(double a, double t, double spi, int year);
double amortization(double a, double t, double spi);
#endif // CALCULATING_H

View File

@ -51,13 +51,8 @@ int main() {
printf("Постобработка (руб): ");
scanf("%lf", &post);
// Получение текущего года
time_t now = time(NULL);
struct tm *local = localtime(&now);
int year = local->tm_year + 1900;
// Расчет амортизации
double am = amortization(a, t, spi, year);
double am = amortization(a, t, spi);
// Расчет себестоимости
double cost = cost_prise(p, t, h, md, d, st, mk, am, post, x);