Advertisement
viraco4a

02.Ilidan

Mar 12th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Illidan
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. int players = int.Parse(Console.ReadLine());
  10. int playerPower = int.Parse(Console.ReadLine());
  11. int ilidanHealth = int.Parse(Console.ReadLine());
  12. long totalPower = playerPower * players;
  13. long delta = Math.Abs(totalPower - ilidanHealth);
  14. if (totalPower >= ilidanHealth)
  15. {
  16. Console.WriteLine($"Illidan has been slain! You defeated him with {delta} points.");
  17. }
  18. else
  19. {
  20. Console.WriteLine($"You are not prepared! You need {delta} more points.");
  21. }
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement