using System; using System.Windows.Forms; namespace KupHesaplamaUygulamasi { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnHesapla_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(txtSayi.Text)) { try { double sayi = Convert.ToDouble(txtSayi.Text); double kup = Math.Pow(sayi, 3); lblSonuc.Text = "Küp: " + kup.ToString(); } catch (FormatException) { lblSonuc.Text = "Geçersiz sayı formatı!"; } } else { lblSonuc.Text = "Bir sayı girin."; } } } }