Advertisement
DrAungWinHtut

AreaOfCircleinCS

Mar 23rd, 2022
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace _2022032301_CS_Area_Of_Circle
  12. {
  13.     public partial class frmArea : Form
  14.     {
  15.         public frmArea()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void btnHello_Click(object sender, EventArgs e)
  21.         {
  22.             MessageBox.Show("Hello World");
  23.         }
  24.  
  25.         private void btnExit_Click(object sender, EventArgs e)
  26.         {
  27.             Application.Exit();
  28.         }
  29.  
  30.         private void btnCalculate_Click(object sender, EventArgs e)
  31.         {
  32.             float fA;
  33.             float fR = float.Parse (txtR.Text);
  34.             fA = 3.14f * fR * fR;
  35.             txtA .Text = fA.ToString();
  36.         }
  37.     }
  38. }
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement