Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class demo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double budget = Double.parseDouble(scanner.nextLine());
- String season = scanner.nextLine();
- if (budget <= 100) {
- if (season.equals("summer")) {
- budget = budget * 0.3;
- System.out.printf
- ("Somewhere in Bulgaria\nCamp - %.2f", budget);
- } else if (season.equals("winter")) {
- budget = budget * 0.7;
- System.out.printf
- ("Somewhere in Bulgaria\nHotel - %.2f", budget);
- }
- } else if (budget <= 1000) {
- if (season.equals("summer")) {
- budget = budget * 0.4;
- System.out.printf
- ("Somewhere in Balkans\nCamp - %.2f", budget);
- } else if (season.equals("winter")) {
- budget = budget * 0.8;
- System.out.printf
- ("Somewhere in Balkans\nHotel - %.2f", budget);
- }
- } else {
- budget = budget * 0.9;
- System.out.printf
- ("Somewhere in Europe\nHotel - %.2f", budget);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement