Не работает форма, в чем ошибка? - C#
Формулировка задачи:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Nyaaa
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
double x;
x = double.Parse(textBox1.Text);
if (x < -3)
{
double y = (Math.Pow(2 * x, 9) + 128);
label1.Text = "" + y;
}
if (x > 6)
{
double y = (2 / 71 * Math.Pow(x, 4) - 2 * Math.Pow(x, 3) + 143);
label1.Text = "" + y;
}
if ((x <= 6) && (x >= -3))
{
double y = (-14 * Math.Pow(x, 3) + 5 * Math.Pow(x, 2) + 2 * x);
label1.Text = "" + y;
}
}
}
}Решение задачи: «Не работает форма, в чем ошибка?»
textual
Листинг программы
Double.Parse(textBox1.Text, CultureInfo.InvariantCulture)