/
Igor_Kar
/
structure_01
Обзор
Документация
Войти
/
Igor_Kar
/
structure_01
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
main.java
20 строк
582 B
Igor_Kar
Structure_prog
10 июл 2026, 21:36
Верифицирован
10 июл 2026, 21:36
9c0cac2
Код
Авторство
О чём код?
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Введи цену товара в руб: "); int price = sc.nextInt(); System.out.print("Введи вес товара в кг: "); int weight = sc.nextInt(); int tax = calcTax(price, weight); System.out.print("Введи размер пошлины в руб: " + tax); } static int calcTax (int price, int weight) { return (int) (price * 0.01 + 100 * weight); } }