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.ShowPlayerStats();
- }
- }
- class Player
- {
- public int Age;
- public int Weight;
- public int Growth;
- public Player(int age, int weight, int growth)
- {
- Age = age;
- Weight = weight;
- Growth = growth;
- }
- public void ShowPlayerStats()
- {
- Console.WriteLine(Age + " лет.\nВес - " + Weight + " килограмм.\nРост - " + Growth + " метр.");
- }
- }
- }
- [EndCode]
Advertisement
Add Comment
Please, Sign In to add comment