14. คอมพิวเตอร์ทาอะไรได้บ้าง
1. A computer can receive information
RAED and GET are used in pseudo code.
READ ใช้กรณีที่มีการอ่านข้อมูลจากแฟ้ มข้อมูล
GET ใช้กรณีรับข้อมูลจากแป้ นพิมพ์
15. 2. A computer can put out information
PRINT , WRITE , PUT , OUTPUT or DISPLAY
are used in pseudo code.
PRINT ใช้กรณีแสดงผลลัพธ์ทำงแป้นพิมพ์
WRITE ใช้กรณีแสดงผลลัพธ์โดยเขียนลงแฟ้มข้อมูล
PUT , OUTPUT , DISPLAY ใช้กรณีแสดงผลลัพธ์ทำงหน้ำจอ
16. 3. A computer can perform arithmetic
the following symbols can be written in pseudo code.
+ for Add
- for Subtract
* for Multiply
/ for Divide
() for Parentheses
COMPUTE หรือ CALCULATE ใช้หน้ำสูตร หรือคำสั่งคำนวณ
17. 4. A computer can assign a value to a variable or memory
location.
กรณีกาหนดค่าเริ่มต้นให้ตัวแปร ให้ใช้คาว่า INITIALISE หรือ SET
กรณีกาหนดค่าที่เป็นผลจากการประมวลผลให้ตัวแปร ใช้สัญลักษณ์ = หรือ
18. 5. A computer can compare two variables and select one of
two alternate action.
keyword IF , THEN and ELSE are used
IF score < 50 THEN
grade = “F”
ELSE
grade = “P”
END IF
19. 6. A computer can repeat a group of actions.
6.1 Leading decision loop
DOWHILE condition p is true
statement block
ENDDO