0
what is answer this question case
Fill in the blanks to test the value of the variable x; if x is 2, print "it's 2" to the screen; otherwise (the default case), print "the default case" to the screen. int x; cin >> x; switch (.....) { case 2: cout << "it's 2" << endl; break; .................: cout << "the default case" << endl; }
7 odpowiedzi
+ 4
int x =10;
switch (x){
case 10:
System.out.println("A");
break;
case 20:
}
+ 3
default
+ 2
int x;
cin >> x;
switch (
x
) {
case 2:
cout << "it's 2" << endl;
break;
default
:
cout << "the default case" << endl;
}
0
x
default
0
Fill in the blanks to test the value of the variable x; if x is 2, print "it's 2" to the screen; otherwise (the default case), print "the default case" to the screen.
int x;
cin >> x;
switch (
x
) {
case 2:
cout << "it's 2" << endl;
break;
default
:
cout << "the default case" << endl;
}
0
Use logical operators to combine conditional statements and return true or false.contentImageThe AND operator works the following way:contentImage
In the AND operator, both operands must be true for the entire expression to be true.
0
Fill in the blanks to test the value of the variable x; if x is 2, print "it's 2" to the screen; otherwise (the default case), print "the default case" to the screen.
int x;
cin >> x;
switch (____) {
case 2:
cout << "it's 2" << endl;
break;
______:
cout << "the default case" << endl;
}