Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CS12Light1
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- // Расчет урона
- int armor = 25;
- int health = 200;
- int damageOfWeapon = 100;
- int damageOnEnemy = damageOfWeapon * (100 - armor) / 100;
- health = health - damageOnEnemy;
- Console.WriteLine("Вы нанесете " + damageOnEnemy + " едениц урона");
- Console.WriteLine("У противника останется " + health + " единиц жизни");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement