Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Test
- {
- class Member
- {
- public int MSV { get; set; }
- public string Name { get; set; }
- public int Age { get; set; }
- public string Lop{ get; set;}
- public void InputInfo()
- {
- MSV = int.Parse(Console.ReadLine());
- Name = Console.ReadLine();
- Age = int.Parse(Console.ReadLine());
- Lop = Console.ReadLine();
- }
- public void ShowInfo()
- {
- Console.WriteLine("MSV: " + MSV);
- Console.WriteLine("Name: " + Name);
- Console.WriteLine("Age: " + Age);
- Console.WriteLine("Lop: " + Lop);
- }
- }
- class HIT
- {
- public Member[] CLB { get; set; }
- public int n {get;set;}
- public void Input()
- {
- n = int.Parse(Console.ReadLine());
- CLB = new Member[n];
- for (int i = 0; i < n; i++)
- {
- CLB[i] = new Member();
- CLB[i].InputInfo();
- }
- }
- public void Output()
- {
- for (int i = 0; i < n; i++) CLB[i].ShowInfo();
- }
- }
- class RunMain
- {
- static void Main(string[] args)
- {
- HIT a = new HIT();
- a.Input();
- a.Output();
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement