NEW
Font size
WorksheetsC++ Quiz Percabangan
Total questions: 5
Worksheet time: 3mins
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
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.
What is the correct way to output the variable 'angka' in the cout statement?
cout << 'angka';
cout << angka;
cout << 'Angka' << angka;
cout << 'Angka ' + angka;
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.
What is missing in the else block of the code?
A return statement
A variable declaration
An output statement
A closing brace
