Advertisement
Spocoman

Excursion

Sep 5th, 2024
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int people = Integer.parseInt(scanner.nextLine()),
  7.                 nights = Integer.parseInt(scanner.nextLine()),
  8.                 cards = Integer.parseInt(scanner.nextLine()),
  9.                 tickets = Integer.parseInt(scanner.nextLine());
  10.  
  11.         double total = (20.00 * nights + 1.60 * cards + 6.00 * tickets) * people * 1.25;
  12.  
  13.         System.out.printf("%.2f\n", total);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement