Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double racketPrice = Double.parseDouble(scanner.nextLine());
- int racketCount = Integer.parseInt(scanner.nextLine()),
- sneakersCount = Integer.parseInt(scanner.nextLine());
- double racketsSum = racketPrice * racketCount,
- sneakersSum = racketPrice / 6 * sneakersCount,
- price = (racketsSum + sneakersSum) * 1.2;
- System.out.println("Price to be paid by Djokovic " + (int) (price / 8));
- System.out.println("Price to be paid by sponsors " + (int) Math.ceil(price * 7 / 8));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement