package PodgotovkaZaIzpit; import java.util.Scanner; public class AgencyProfit { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String name = scanner.nextLine(); int adultTicketCount = Integer.parseInt(scanner.nextLine()); int kidTicketCount = Integer.parseInt(scanner.nextLine()); double adultPrice = Double.parseDouble(scanner.nextLine()); double servicePrice = Double.parseDouble(scanner.nextLine()); double kidsPrice = adultPrice*0.3; double adultPriceWthSer = adultPrice + servicePrice; double kidPriceWthSer = kidsPrice + servicePrice; double allSum = (adultPriceWthSer*adultTicketCount) + (kidPriceWthSer*kidTicketCount); double profit = allSum*0.2; System.out.printf("Izrechenie %.2f ", profit); } }