Valik98

Untitled

May 26th, 2019
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. double filmBudget = Double.parseDouble(console.nextLine());
  2. int actorsCount = Integer.parseInt(console.nextLine());
  3. double priceForActorClothes = Double.parseDouble(console.nextLine());
  4.  
  5. double decourPrice = filmBudget * 0.10;
  6. double clothesMoney = actorsCount * priceForActorClothes;
  7. double MovieBudget = decourPrice + clothesMoney;
  8. double moneyLeft = filmBudget - MovieBudget;
  9. double discount = 0.0;
  10.  
  11. if (actorsCount <= 150){
  12. System.out.printf("Action!%nWingard starts filming with %.2f leva left.", moneyLeft);
  13. }
  14.  
  15. else if (filmBudget < clothesMoney){
  16. System.out.printf("Not enough money!%nWingard needs %.2f leva more.", moneyLeft);
  17. }
  18.  
  19. else if (actorsCount >= 150){
  20. discount = clothesMoney * 0.1 - clothesMoney;
  21.  
  22.  
  23. System.out.printf("Action!%nWingard starts filming with %.2f leva left.", moneyLeft);
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment