- 3
ABOUT UR QUESTION
Fill in the blanks to test both conditions in the following if statement. int age = 23; int money = 4; if (age > 21 __________money > 500) { cout << "welcome" << endl; } if two conditions are true,then only it will print welcome.. how to resolve this question using and operator its possible?? give clearness about this question
4 odpowiedzi
+ 7
yes. it is correct
+ 2
Use! "logical and" operator (&&)
0
int age = 26;
int money = 4;
if (age > 21 [ && ] money > 500) {
cout << "welcome" << endl;
}
- 2
int age = 26;
int money = 4;
if (age > 21 [ ] money > 500) {
cout << "welcome" << endl;
}
Answer is ||