Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- int t1, t3, t4;
- double t2, t5, t6, t7, t8 = 1000.0, t9 = 1000.0, t10 = 100.0, t11 = 500.0;
- t1 = Convert.ToInt32(textBox1.Text);
- t2 = Convert.ToDouble(textBox2.Text);
- t3 = Convert.ToInt32(textBox3.Text);
- t4 = Convert.ToInt32(textBox4.Text);
- t5 = (t1 / t9);
- t6 = (t2 / t8);
- t7 = (t5 + t6);
- textBox5.Text = string.Format("{0};{1};{2};{3}Vol={4}_OpI={5}", t7, "clrRed", 1, 0, t3, t4); // вывод результата в пятый textbox
- }
- int t1;
- if (!Int32.TryParse(textBox1.Text, out t1))
- {
- throw new InvalidOperationException("Введите число");
- }
- // дальше можно работать с t1
- // аналогично для других переменных
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement