private static void Task() { int[,] Arr2 = ToolsConsoleArr2.ReadArr2(); ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); List <Cell> list = toolsArr2.GetCels(); ToolsConsoleArr2.OutputStr(ConvertList.ListToStr(list)); }
private void CalcBtn_Click(object sender, EventArgs e) { try { List <int> list = ConvertList.StrToList(ListInput.Text); ToolsList toolsList = new ToolsList(list); List <int> listNew = (List <int>)toolsList.Process((int)InputN.Value); Output.Text = ConvertList.ListToStr(listNew, ", "); } catch (Exception) { MessageBox.Show("ошибка ввода", "ошибка"); } }
private void CalcBtn_Click(object sender, EventArgs e) { try { List <int> list = ConvertList.StrToList(ListInput.Text); ToolsList toolsList = new ToolsList(list); List <int> listNew = toolsList.Process(out bool success); Output.Text = ConvertList.ListToStr(listNew) + "\n" + (success ? "успешно" : "не успешно"); } catch (Exception) { MessageBox.Show("ошибка ввода", "ошибка"); } }
private void SearchBtn_Click(object sender, EventArgs e) { try { int[,] Arr2 = DataGridViewUtils.GridToArray2 <int>(Input); ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); List <Cell> list = toolsArr2.GetCels(); Output.Text = ConvertList.ListToStr(list); save.Enabled = true; } catch (Exception) { MessageBox.Show("ошибка ввода", "ошибка"); } }
static void Main(string[] args) { while (true) { int[,] Arr2 = ToolsConsoleArr2.ReadArr2(); if (Arr2.GetLength(0) != Arr2.GetLength(1)) { Console.WriteLine("не квадратная матрица"); } else { ToolsArr2 toolsArr2 = new ToolsArr2(Arr2); IList <Row> list = toolsArr2.GetRowsSum(); ToolsConsoleArr2.OutputStr(ConvertList.ListToStr(list, "\r\n")); } } }