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);
- String movie = scanner.nextLine();
- int days = Integer.parseInt(scanner.nextLine()),
- tickets = Integer.parseInt(scanner.nextLine());
- double ticketPrice = Double.parseDouble(scanner.nextLine());
- int percent = Integer.parseInt(scanner.nextLine());
- double price = days * tickets * ticketPrice * (100 - percent) / 100;
- System.out.printf("The profit from the movie %s is %.2f lv.", movie, price);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement