Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [StartCode]
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp21
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Player player1 = new Player(5,3,1);
- player1.ShowStats();
- }
- }
- class Player
- {
- private int _age;
- private int _weight;
- private int _growth;
- public Player(int age, int weight, int growth)
- {
- _age = age;
- _weight = weight;
- _growth = growth;
- }
- public void ShowStats()
- {
- Console.WriteLine(_age + " лет.\nВес - " + _weight + " килограмма.\nРост - " + _growth + " метр.");
- }
- }
- }
- [EndCode]
Advertisement
Add Comment
Please, Sign In to add comment