Укажите верный синтаксис для оператора if C++?
Операторы If и Switch в C++

Quiz
•
Computers
•
10th Grade
•
Medium
Надежда Натарова
Used 19+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
if (логическое выражение) {оператор1 }; else {оператор2};
if test
IF test
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Заполните пусте места, чтобы сравнить переменные и вывести на экран «hi there»:
int x = 5;
int y =3;
if ( ......... )
{
cout <<«hi there»;
}
х=y
x>y
x<y
x!=y
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Какой оператор используется для сравнения?
=
<<
==
!=
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Заполните пустые места, чтобы сравнивать переменные и вывести «not equal» на экран.
int x = 10;
int y = 8;
if ( ................) {
cout << «not equal»;
}
==
!=
=
<>
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Каков результат работы следующего франмента кода?
int x = 0;
switch(x)
{
case 1: cout << "Один";
case 0: cout << "Нуль";
case 2: cout << "Привет мир";
}
а) НульПривет мир
б) Привет мир
в) Один
г) Нуль
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Заполните пустые места, чтобы проверить значение переменной x; если x равен 2, вывести на экран ‘its 2"; иначе (случай default), вывести на экран "the default case";
int x;
cin>>x;
switch (x) {
case 2: cout<<"its 2″<<endl; break;
............... : cout<<«the default case»<<endl;
}
default
else
ifelse
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Что произойдёт, если мы забудем добавить «break» после «case»?
Будут выполнены остальные операторы case
Ничего
Ошибка времени выполнения
Create a free account and access millions of resources
Similar Resources on Quizizz
12 questions
Bab 1.4.2 - Operator Hubungan dan Operator Logikal dlm Struktur

Quiz
•
9th - 12th Grade
14 questions
Limbajul de programare C++ ” INSTRUCȚIUNEA IF”

Quiz
•
10th Grade
10 questions
Kuis Percabangan dan Perulangan

Quiz
•
10th Grade
15 questions
ELEMENTE DE BAZA ALE LIMBAJULUI C++

Quiz
•
10th Grade
10 questions
C++ Basics Quiz

Quiz
•
9th - 12th Grade
10 questions
Programming with C++

Quiz
•
9th - 12th Grade
10 questions
Coding C++ - X2

Quiz
•
10th Grade
14 questions
C++ - Loops and Random Numbers

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade