Search Header Logo

การเขียนโปรแกรมแบบมีทางเลือก (if else if)

Authored by kruauy Chaisriha

Computers

9th - 12th Grade

Used 1+ times

การเขียนโปรแกรมแบบมีทางเลือก (if else if)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

การทำงานแบบทางเลือก (Selection) มีชื่อเรียกอีกอย่างหนึ่งว่าอย่างไร

การทำงานแบบสองทิศทาง

การทำงานแบบวนซ้ำ

การทำงานแบบตัดสินใจ

การทำงานตามลำดับ

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

การเขียนฟังก์ชันในลักษณะ if-else-if ใช้กับเงื่อนไขแบบใด

เงื่อนไขแบบทางเดียว

เงื่อนไขแบบสองทาง

เงื่อนไขแบบหลายทาง

ไม่มีข้อถูก

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

ถ้าหากต้องการตรวจสอบคะแนนที่อยู่ในตัวแปร mark ว่า ถ้าหากคะแนนเกิน 80 ให้แจ้ง ว่าได้ กรด A จะต้องเขียนอย่างไร

if((mark >= 80) && (mark <= 100) printf("A");

if(mark > 80); prinf("A");

if(80 < mark <= 100) printf("A");

if(mark > 80) printf('A');

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

คำสั่ง if (x >= 50) printf(“Pass”); else printf(“Fail”); เมื่อ x = 0 จะแสดงผลอย่างไร

แสดงข้อความ Pass แล้วขึ้นบรรทัดใหม่

แสดงข้อความ Fail แล้วขึ้นบรรทัดใหม่

แสดงข้อความ Pass

     แสดงข้อความ Fail

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

ประโยคในข้อใดเป็นการตรวจสอบว่าตัวแปร x อยู่ในช่วงตั้ง แต่ 20 ถึง 30คำสั่ง ifลอย่างไร

if((x >= 20)||(x <= 30))

if((x >= 20) && (x <= 30))

if(20 < x <30)

     if((x <= 10)&&(x >= 20))

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?