SHARE
TWEET

C# Light 1.9

a guest Aug 21st, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace CS12Light1
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             // Расчет урона
  10.             int armor = 25;
  11.             int health = 200;
  12.             int damageOfWeapon = 100;
  13.             int damageOnEnemy = damageOfWeapon * (100 - armor) / 100;
  14.             health = health - damageOnEnemy;
  15.             Console.WriteLine("Вы нанесете " + damageOnEnemy + " едениц урона");
  16.             Console.WriteLine("У противника останется " + health + " единиц жизни");
  17.         }
  18.     }
  19. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top