/
SamMih
/
HOMEWORK4retake2
Обзор
Документация
Войти
/
SamMih
/
HOMEWORK4retake2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
calculateTax.java
18 строк
486 B
SamMih
ДЗ-4 - корректировка
30 май 2025, 15:34
30 май 2025, 15:34
4186db9
Код
Авторство
О чём код?
public class calculateTax { public static int calculateTaxEarnings(int earnings) { int tax = (earnings)*6/100; if (tax >=0) { return tax; } else { return 0; } } public static int calculateTaxEarningsMinusSpendings(int earnings, int spendings) { int tax = (earnings - spendings)*15/100; if (tax >=0) { return tax; } else { return 0; } } }