Page 43 - E-Modul Pemrograman Dasar Kelas X
P. 43

private void btnitung_Click(object sender, EventArgs e)
                                       {
                                              double panjang, lebar, tinggi, volume;
                                              panjang double.Parse(txtPanjang.Text);

                                              lebar double.Parse(txtLebar.Text);
                                              tinggi double.Parse(txtTinggi.Text);
                                              volume = panjang lebar tinggi;
                                              txtVolume.Text = Convert.ToString(volume);

                                       }

                                       private void btnKeluar_Click(object sender, EventArgs e)
                                       {
                                              this.Close();
                                       }

                               }
                        }

                          f)  Form volume tabung (frmTabung)


                        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 frmTabung: Form
                               {

                                       public frmTabung()
                                       {
                                              InitializeComponent();
                                       }






                                                             34
   38   39   40   41   42   43   44   45   46   47   48