using System;
using System.Windows.Forms;
namespace daireAlanveCevresi
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnHesapla_Click(object sender, EventArgs e)
{
const double PI = 3.14159265;
double daireAlan, daireCevre, yariCap;
yariCap = Convert.ToInt32(txtYaricap.Text);
daireCevre = PI * 2 * yariCap;
daireAlan = PI*(Math.Pow(yariCap, 2));
txtDaireCevresi.Text = daireCevre.ToString();
txtDaireAlani.Text = daireAlan.ToString();
}
}
}
3 label - 3 textbox - 1 buton