Advertisement
Guest User

02. Illidan

a guest
Mar 12th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner sc = new Scanner(System.in);
  9.         int numOfPeople  = Integer.valueOf(sc.nextLine());
  10.         int bloodOFonePeople = Integer.valueOf(sc.nextLine());
  11.         int bloodOfILIDAN = Integer.valueOf(sc.nextLine());
  12.         int bloodOfPeople = numOfPeople*bloodOFonePeople;
  13.         if (bloodOfILIDAN>bloodOfPeople){
  14.             int peopleNOTprepared = bloodOfILIDAN-bloodOfPeople;
  15.             System.out.print("You are not prepared! You need "+peopleNOTprepared+" more points.");
  16.         } else {
  17.             int defeatILIDAN = bloodOfPeople - bloodOfILIDAN;
  18.             System.out.print("Illidan has been slain! You defeated him with "+defeatILIDAN+" points.");
  19.         }
  20.  
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement