namespace WinFormsApp2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } Random random = new Random(); private void button1_Click(object sender, EventArgs e) { int uretilen, i; listBox1.Items.Clear(); for (i = 0; i < 10; i++) { uretilen = random.Next(0, 360); listBox1.Items.Add(uretilen); } } private void radioButton5_CheckedChanged(object sender, EventArgs e) { if (radioButton5.Checked) { listBox2.Items.Clear(); for (int a = 0; a < listBox1.Items.Count; a++) { listBox2.Items.Add(Math.Pow(Convert.ToDouble(listBox1.Items[a]), 2)); } } } private void radioButton4_CheckedChanged(object sender, EventArgs e) { if (radioButton4.Checked) { listBox2.Items.Clear(); for (int a = 0; a < listBox1.Items.Count; a++) { double sayi = Convert.ToDouble(listBox1.Items[a]); double sin = Math.Sin(sayi * Math.PI / 180); listBox2.Items.Add(sin); } } } private void radioButton1_CheckedChanged(object sender, EventArgs e) { if (radioButton1.Checked) { listBox2.Items.Clear(); double[] sayilar = new double[listBox1.Items.Count]; for (int i = 0; i < listBox1.Items.Count; i++) { sayilar[i] = Convert.ToDouble(listBox1.Items[i]); } for (int i = 0; i < sayilar.Length - 1; i++) { for (int j = i + 1; j < sayilar.Length; j++) { if (sayilar[i] < sayilar[j]) { double temp = sayilar[i]; sayilar[i] = sayilar[j]; sayilar[j] = temp; } } } for (int i = 0; i < sayilar.Length; i++) { listBox2.Items.Add(sayilar[i]); } } } private void radioButton2_CheckedChanged(object sender, EventArgs e) { if (radioButton2.Checked) { listBox2.Items.Clear(); double[] sayilar = new double[listBox1.Items.Count]; for (int i = 0; i < listBox1.Items.Count; i++) { sayilar[i] = Convert.ToDouble(listBox1.Items[i]); } for (int i = 0; i < sayilar.Length - 1; i++) { for (int j = i + 1; j < sayilar.Length; j++) { if (sayilar[i] > sayilar[j]) { double temp = sayilar[i]; sayilar[i] = sayilar[j]; sayilar[j] = temp; } } } for (int i = 0; i < sayilar.Length; i++) { listBox2.Items.Add(sayilar[i]); } } } } }