Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.SQLOutput;
- import java.util.Scanner;
- public class GodzillavsKong {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double A = Double.parseDouble(scanner.nextLine());
- int B = Integer.parseInt(scanner.nextLine());
- double C = Double.parseDouble(scanner.nextLine());
- double D = B*C;
- double E = (A/100)*10;
- if (B>=150){
- D=D*0.9;
- }
- double F = E+D;
- if (A<F){
- System.out.println("Not enough money!");
- System.out.printf(" Wingard needs %.2f leva more.",F-A);
- }else if (A>=F){
- System.out.println("Action! ");
- System.out.printf("Wingard starts filming with %.2f leva left.",A-F);
- }
- }
- }
Add Comment
Please, Sign In to add comment