Advertisement
Sim0o0na

2. Illidan

Mar 12th, 2018
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace P02
  8. {
  9.     class Illidan
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int people = int.Parse(Console.ReadLine());
  14.             int power = int.Parse(Console.ReadLine());
  15.             int healthOfIllidan = int.Parse(Console.ReadLine());
  16.  
  17.             int damage = people * power;
  18.             int diff = Math.Abs(damage - healthOfIllidan);
  19.  
  20.             if (damage < healthOfIllidan)
  21.             {
  22.                 Console.WriteLine($"You are not prepared! You need {diff} more points.");
  23.             }
  24.             else
  25.             {
  26.                 Console.WriteLine($"Illidan has been slain! You defeated him with {diff} points.");
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement