Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class LiveDemo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double moneyFood = Double.parseDouble(scanner.nextLine());
- double moneySouvenirs = Double.parseDouble(scanner.nextLine());
- double moneyHotel = Double.parseDouble(scanner.nextLine());
- int distance = 210;
- int timeDays = 3;
- int spendKilometers = 7 / 100;
- double pricePerKilometer = 1.85;
- double allPriceForHotel = Double.parseDouble(scanner.nextLine());
- double firstDay = allPriceForHotel * 0.10;
- double secondDay = allPriceForHotel * 0.15;
- double thirdDay = allPriceForHotel * 0.20;
- System.out.printf("Money needed: %.2f %f", allPriceForHotel);
- }
- }
Add Comment
Please, Sign In to add comment