Professional Documents
Culture Documents
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsControlLibrary3
{
public partial class UserControl1: UserControl
{
public UserControl1()
{
InitializeComponent();
}
if (radioButton2.Checked)
{
int broj = Convert.ToInt32(textBox3.Text);
double x = a, korak = (b - a) / (broj - 1);
for (int i = 0; i < broj; i++, x += korak)
{
if (x * x - x * 4 - 6 >= 0 && 17 - 4 * x != 0)
{
double y = (2 + Math.Sqrt(x * x - 4 + x - 6)) / (17 - 4 * x);
listBox1.Items.Add("f(" + x.ToString("0.00") + ")= " + y.ToString("0.00"));
}
else
listBox1.Items.Add("Za " + x.ToString("0.00") + "nije definisana");
}
}
else
{
listBox1.Items.Clear();
}
}
}
}