SHARE
TWEET

Untitled

a guest Jun 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.sql.SQLOutput;
  2. import java.util.Scanner;
  3.  
  4. public class DemoLive {
  5.     public static void main(String[] args) {
  6.         Scanner scanner = new Scanner(System.in);
  7.  
  8.         double budget=Double.parseDouble(scanner.nextLine());
  9.  
  10.         double priceHonorar=0;
  11.         while (budget >= priceHonorar) {
  12.             String input=scanner.nextLine();
  13.             if (input.equals("ACTION")) {
  14.                 break;
  15.             }
  16.             double income = Double.parseDouble(scanner.nextLine());
  17.            
  18.             if (input.length() > 15) {
  19.                 priceHonorar = budget * 0.2;
  20.                 budget = budget - priceHonorar;
  21.                 double left = budget - priceHonorar;
  22.                 System.out.printf("We are left with %.2f leva.", left);
  23.                 break;
  24.             }
  25.             input=scanner.nextLine();
  26.         }
  27.  
  28.             if (budget < priceHonorar) {
  29.                 double need=priceHonorar-budget;
  30.                 System.out.printf("We need %.2f leva for our actors.",need);
  31.             }
  32.  
  33.  
  34.  
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top