private void btnTask7_Click(object sender, EventArgs e) { double V1; double T1; double V2; double T2; double.TryParse(txtTask7V1.Text, out V1); double.TryParse(txtTask7T1.Text, out T1); double.TryParse(txtTask7V2.Text, out V2); double.TryParse(txtTask7T2.Text, out T2); //lblTask2.Text = calculator.task2(R).ToString(); try { lblTask7V.Text = calculator.task7(V1, T1, V2, T2)[0].ToString(); lblTask7T.Text = calculator.task7(V1, T1, V2, T2)[1].ToString(); } catch (ArgumentException mes) { MessageBox.Show(mes.Message, "Ошибка!!!", MessageBoxButtons.OK, MessageBoxIcon.Error); txtTask7V1.Text = "0"; txtTask7V2.Text = "0"; lblTask7V.Text = " "; lblTask7T.Text = " "; } }
public void test1() { List <double> result = obj.task7(1, 30, 3, 20); List <double> otvet = new List <double> { 4, 22.5 }; CollectionAssert.AreEqual(otvet, result); }
public void Execute(lab1Calc Laba1) { double V1; double T1; double V2; double T2; Console.WriteLine("Введите V1"); double.TryParse(Console.ReadLine(), out V1); Console.WriteLine("Введите T1"); double.TryParse(Console.ReadLine(), out T1); Console.WriteLine("Введите V2"); double.TryParse(Console.ReadLine(), out V2); Console.WriteLine("Введите T2"); double.TryParse(Console.ReadLine(), out T2); Console.WriteLine("Объем: " + Laba1.task7(V1, T1, V2, T2)[0] + " Температура: " + Laba1.task7(V1, T1, V2, T2)[1]); }