Yaptığım Program C# Diliyle Yazılmıştır -------------------------------------------- using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
namespace Kelime_Çıkartan_Program { public partial class Form1 : Form { public Form1() { InitializeComponent(); } int harf_sayisi; private void button1_Click(object sender, EventArgs e) { try { if (denge == true) { denge = false; } else { denge = true; } harf_sayisi = Convert.ToInt32(textBox1.Text); if (button1.Text == "Başlat" || button1.Text == "Devam Ettir") { timer1.Start(); button1.Text = "Durdur"; } else { timer1.Stop(); button1.Text = "Devam Ettir"; } } catch (Exception) { MessageBox.Show("Lütfen Düzgün Değer Giriniz!", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } public bool kontrol(string gelen) { bool x = true; if (listBox1.Items.Count != 0) { foreach (string item in listBox1.Items) { if (gelen == item) { x = false; } } } return x; } string[] _sessizHarf = { "r", "t", "y", "p", "s", "d", "f", "g", "h", "k", "l", "z", "c", "v", "b", "n", "m" }; string[] _sesliHarf = { "a", "e", "ı", "o", "u" }; string ifade = ""; bool denge; Random x = new Random(); private void timer1_Tick(object sender, EventArgs e) { for (int i = 0; i < harf_sayisi; i++) { if (denge == true) { ifade += _sessizHarf[x.Next(0, _sessizHarf.Length)].ToUpper(); denge = false; } else { ifade += _sesliHarf[x.Next(0, _sesliHarf.Length)].ToUpper(); denge = true; } } if (kontrol(ifade) != false) { listBox1.Items.Add(ifade); } ifade = ""; }