This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

วันอังคารที่ 31 กรกฎาคม พ.ศ. 2561

คำนวณค่าน้ำประปา

การคำนวณค่าน้ำประปา

1. วิเคราะห์และกำหนดรายละเอียดของปัญหา

1.1  ข้อมูลออก  ค่าน้ำประปาที่ต้องจ่าย
1.2  ข้อมูลเข้า   หน่วยน้ำประปาที่ใช้ไป

1.3 การประมวณ  - ค่าน้ำไม่เกิน 10 หน่วยต่อเดือนไม่เสียค่าน้ำประปา
                            - ค่าน้ำไม่เกิน 20 หน่วยต่อเดือน อัตราหน่วยละ 5 บาท
                            - ค่าน้ำที่เกินจาก 20 หน่วยแรก แต่ไม่เกิน 40 หน่วย คิดหน่วยละ 7 บาท
                            - ค่าน้ำที่เกินจาก 40 หน่วยแรก แต่ไม่เกิน 100หน่วย คิดหน่วยละ 10 บาท
                            - ค่าน้ำที่เกินจาก 100 หน่วยขึ้นไปคิดหน่วยละ 15 บาท

2.เขียนรหัสจำลอง

                               เริ่มต้น

1. รับค่า "หน่วยประปาที่ใช้ไป"

2. ประมวณผลโดย
    2.1 ถ้า 1 - 10 หน่วย ไม่เสียค่าน้ำประปา
    2.2 ถ้า 1 - 20 หน่วย เสียค่าน้ำประปาหน่วยละ 5 บาท
    2.3 หน่วยที่ 21 - 40 เสียค่าน้ำประปาหน่วยละ 7 บาท
    2.4 หน่วยที่ 41 - 100 เสียค่าน้ำประปาหน่วยละ 10 บาท
    2.5 หน่วยที่ 101 ขึ้นไป เสียค่าน้ำประปาหน่วยละ 15 บาท

3. แสดง "ค่าน้ำประปาที่ต้องจ่าย"
                     
                                 สิ้นสุด

3. Flowchart