Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. public class Main {
  2. public static void main(String[] args) {
  3. double money = 14.80;
  4.  
  5. if (money < 13) {
  6. System.out.println("You don't have enough money.");
  7. } else if (money == 13) {
  8. System.out.println("With " + money + " euro, the best combinat is b and r");
  9. } else if(money > 13 && money <= 13.30) {
  10. System.out.println("With " + money + " euro, the best combination is b and f");
  11. } else if (money > 13.30 && money <= 14.00) {
  12. System.out.println("With " + money + " euro, the best combination is n and f");
  13. } else if(money > 14 && money <= 14.30) {
  14. System.out.println("With " + money + " euro, the best combination is n and r");
  15. } else if (money > 14.30 && money <= 14.49) {
  16. System.out.println("With " + money + " euro, the best combination is p and f");
  17. } else if (money > 14.49 && money <= 14.79) {
  18. System.out.println("With " + money + " euro, the best combinat is p and r");
  19. } else if(money > 14.79 || money >= 15.80 && money < 16.10) {
  20. System.out.println("With " + money + " euro, the best combinat is c and f");
  21. } else {
  22. System.out.println("With " + money + " euro, the best combinat is c and r");
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement