Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Sea {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double foodMoneyPerDay = Double.parseDouble(scanner.nextLine());
- double souvenirsMoneyPerDay = Double.parseDouble(scanner.nextLine());
- double hotelMoneyPerDay = Double.parseDouble(scanner.nextLine());
- double costsTransport = 7 * 210.0 / 100 * 1.85;
- double total = costsTransport * 2 + foodMoneyPerDay * 3 +
- souvenirsMoneyPerDay * 3 + hotelMoneyPerDay * 0.9 +
- hotelMoneyPerDay * 0.85 + hotelMoneyPerDay * 0.8;
- System.out.printf("Money needed: %.2f", total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement