ref: del calc year
This commit is contained in:
parent
a38c7c284f
commit
d803766a42
@ -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;
|
||||
|
@ -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
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user