โปรแกรมคำนวณการขายสินค้า
โปรแกรมคำนวณรายการขาย
หน้าจอออกแบบ
คำสั่ง
ปุ่มคำนวณ
private void button1_Click(object sender, EventArgs e)
{
int num1,num2,sell;
num1 = Convert.ToInt32(textBox1.Text);
num2 = (num1 * 3) / 100;
sell = (num1 – num2);
label3.Text =(num2.ToString());
textBox2.Text =(sell.ToString());
}
ปุ่มยกเลิก
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = “”;
label3.Text = “”;
textBox2.Text = “”;
}
ปุ่มออกจากโปรแกรม
private void button3_Click(object sender, EventArgs e)
{
Close();
}
ผลการรันโปรแกรม
Posted on กันยายน 15, 2014, in ภาษา C. Bookmark the permalink. ใส่ความเห็น.
ใส่ความเห็น
Comments 0