Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- double money = 14.80;
- if (money < 13) {
- System.out.println("You don't have enough money.");
- } else if (money == 13) {
- System.out.println("With " + money + " euro, the best combinat is b and r");
- } else if(money > 13 && money <= 13.30) {
- System.out.println("With " + money + " euro, the best combination is b and f");
- } else if (money > 13.30 && money <= 14.00) {
- System.out.println("With " + money + " euro, the best combination is n and f");
- } else if(money > 14 && money <= 14.30) {
- System.out.println("With " + money + " euro, the best combination is n and r");
- } else if (money > 14.30 && money <= 14.49) {
- System.out.println("With " + money + " euro, the best combination is p and f");
- } else if (money > 14.49 && money <= 14.79) {
- System.out.println("With " + money + " euro, the best combinat is p and r");
- } else if(money > 14.79 || money >= 15.80 && money < 16.10) {
- System.out.println("With " + money + " euro, the best combinat is c and f");
- } else {
- System.out.println("With " + money + " euro, the best combinat is c and r");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement