กรุณาเลือก แสดงผลรูปแบบโทรศัพท์มือถือ | แสดงผลรูแบบคอมพิวเตอร์

Dekcom Board • The Ultimate Knowledge Share

 ลืมรหัสผ่าน
 ลงทะเบียน
ค้นหา
ดู: 781|ตอบ: 0

เฉลยแบบฝึกหัด ท้ายบทที่ 5 ข้อที่ 10 [คัดลอกลิงก์]

Rank: 9Rank: 9Rank: 9

Money
144
จิตพิศัย
39
สมัครสมาชิกเมื่อ
2009-12-20
เครดิต
39
โพสต์
42
webmaster โพสต์เมื่อ 2010-8-5 08:29:03 |แสดงโพสต์ทั้งหมด
  1. private void Form1_Load(object sender, EventArgs e)
  2.         {
  3.             label3.Text = "";
  4.             label5.Text = "";
  5.         }

  6.         private void button3_Click(object sender, EventArgs e)
  7.         {
  8.             Application.Exit();
  9.         }

  10.         private void button2_Click(object sender, EventArgs e)
  11.         {
  12.             textBox1.Text = "";
  13.             radioButton1.Checked = false;
  14.             radioButton2.Checked = false;
  15.             radioButton3.Checked = false;
  16.             label3.Text = "";
  17.             label5.Text = "";
  18.             textBox1.Focus();
  19.         }

  20.         private void button1_Click(object sender, EventArgs e)
  21.         {

  22.             double Price, vat=0,net_price=0;
  23.             Price = double.Parse(textBox1.Text);

  24.             if (radioButton1.Checked == true)
  25.             {
  26.                 vat= Price * 0.03;
  27.             }
  28.             if (radioButton2.Checked == true)
  29.             {
  30.                 vat = Price * 0.07;
  31.             }
  32.             if (radioButton3.Checked == true)
  33.             {
  34.                 vat = Price * 0.1;
  35.             }

  36.             net_price = Price + vat;

  37.             label3.Text = vat.ToString() + " บาท";
  38.             label5.Text = net_price.ToString() + " บาท";

  39.         }
คัดลอกไปที่คลิปบอร์ด
ผลรัน
2010-08-05_082122.jpg
2010-08-05_082134.jpg
2010-08-05_082144.jpg
2010-08-05_082150.jpg

Lab5_10.rar

37.71 KB, จำนวนดาวน์โหลด: 37


รับทำเว็บ PHP+MySQL
คุณต้องเข้าสู่ระบบก่อนจึงจะสามารถตอบกลับ เข้าสู่ระบบ | ลงทะเบียน

รูปแบบข้อความล้วน|โทรศัพท์มือถือ|เด็กคอมพ์ชิตี้

GMT+7, 2012-5-21 05:15 , Processed in 0.029433 second(s), 16 queries , Gzip On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc. Page Ranking Tool

ขึ้นไปด้านบน