Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _5._1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Hero hero = new Hero("Fergos", "Archer", 27, 42, 68, 37);
- hero.GetInformation();
- }
- }
- class Hero
- {
- string name;
- string type;
- int level;
- int strength;
- int agility;
- int intelligence;
- public Hero (string name, string type, int level, int strength, int agility, int intelligence)
- {
- this.name = name;
- this.type = type;
- this.level = level;
- this.strength = strength;
- this.agility = agility;
- this.intelligence = intelligence;
- }
- public void GetInformation()
- {
- Console.WriteLine("Имя персонажа - " + name + "\nКласс героя - " + type
- + "\nУровень персонажа - " + level + "\nСила - " + strength +
- "\nЛовкость - " + agility + "\nИнтеллект - " + intelligence);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement