Page 42 - E-Modul Pemrograman Dasar Kelas X
P. 42
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();
}
}
}
e) Form volume kotak (frmKotak)
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 frmkotak: Form
{
public frmKotak()
{
InitializeComponent();
}
33