Search Header Logo

CP04-01 Control Statement: Selection

Authored by Panupong Sornkhom

Computers

University - Professional Development

Used 11+ times

CP04-01 Control Statement: Selection
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.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

จากคำสั่งต่อไปนี้เมื่อทำงานจนจบ x มีค่าเท่าไร เมื่อ a = 1000

(ตอบเฉพาะตัวเลข)

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

num มีค่าเท่าไร หลังการทำงานของโปรแกรมนี้

(ตอบเฉพาะตัวเลข)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

ถ้า A = 8 เงื่อนไขดังต่อไปนี้ให้ผลลัพธ์อะไร

หาค่าไม่ได้

B = 0

B = 10

B = 20

B = 30

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

เมื่อจบการทำงาน y จะมีค่าเท่าใด

(ตอบเฉพาะตัวเลข)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

การใช้ if statement เพื่อเช็คดูว่าค่าของ n เป็นเลขคี่ ซึ่งอยู่ในช่วงตั้งแต่ 10 - 30 หรือไม่นั้น เราต้องเขียนคำสั่งอย่างไร

if ( n%2 == 0 || n >= 10 && n<=30 )

if ( n%2 == 1 && n >= 10 && n <= 30 )

if (n%2 != 0 || n >= 10 && n <= 30)

if ( n/2 == 1 && n>=10 && n<=30)

if ( n%2 == 1) || n>=10 || n <= 30)

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?