Second homework in C# part 1