kwest87

Untitled

Apr 24th, 2022
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. [StartCode]
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace ConsoleApp21
  9. {
  10. internal class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. Player player1 = new Player(5,3,1);
  15. player1.ShowPlayerStats();
  16. }
  17. }
  18.  
  19. class Player
  20. {
  21. public int Age;
  22. public int Weight;
  23. public int Growth;
  24.  
  25. public Player(int age, int weight, int growth)
  26. {
  27. Age = age;
  28. Weight = weight;
  29. Growth = growth;
  30. }
  31.  
  32. public void ShowPlayerStats()
  33. {
  34. Console.WriteLine(Age + " лет.\nВес - " + Weight + " килограмм.\nРост - " + Growth + " метр.");
  35. }
  36. }
  37. }
  38. [EndCode]
Advertisement
Add Comment
Please, Sign In to add comment