bahasa C atau code untuk Luas dan Volume balok :
namespace latihan2
{
public partial class Form1 : Form
{
float L;
float V;
float p;
float l;
float t;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
p = float.Parse(textBox1.Text);
l = float.Parse(textBox2.Text);
t = float.Parse(textBox3.Text);
L = 2*(p*l+p*t+l*t);
V = (p*l*t);
textBox4.Text = L.ToString();
textBox5.Text = V.ToString();
}
}
}
Tidak ada komentar:
Posting Komentar