Search Header Logo

C++ Quiz Percabangan

Authored by Fauzul Karomi

Others

10th Grade

Used 1+ times

C++ Quiz Percabangan
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

30 sec • 1 pt

What is the purpose of the 'if' statement in the code?

To output text to the console

To check if a number is even or odd

To perform a loop

To declare a variable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed if the input number is 4?

Angka 4 adalah angka negatif.

Angka 4 adalah angka positif.

Angka 4 adalah angka genap.

Angka 4 adalah angka ganjil.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to output the variable 'angka' in the cout statement?

cout << 'angka';

cout << angka;

cout << 'Angka' << angka;

cout << 'Angka ' + angka;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if the input number is 3?

It will print that the number is odd.

It will cause a compilation error.

It will not print anything.

It will print that the number is even.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in the else block of the code?

A return statement

A variable declaration

An output statement

A closing brace

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?