Page 46 - E-Modul Pemrograman Dasar Kelas X RPL_Neat
P. 46
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()
36