Page 39 - E-Modul Pemrograman Dasar
P. 39

d)  Form luas lingkaran (frmLingkaran)


                        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 Luasdanvolume

                        {
                               public partial class frmLingkaran : Form
                               {
                                       public frmlingkaran()

                                       {
                                              InitializeComponent();
                                       }

                                       private void btnHitung_Click(object sender, EventArgs e)

                                       {
                                              double jari, luas;
                                              jari = double.Parse(txtJari.Text);
                                              luas 3.14 jari jari;

                                              txtLuas.Text = Convert.ToString(luas);
                                       }

                                       private void btnKeluar_Click(object sender, EventArgs e)
                                       {

                                              this.Close();
                                       }
                               }
                        }








                                                             30
   34   35   36   37   38   39   40   41   42   43   44