0
Operators Confusion
7 Antworten
+ 2
You questions looks incomplete.....
Can you elaborate a bit more.
+ 2
The problem is to print welcome on the screen.
int age = 26
int money = 4;
if (age > 21 this is the part I’m stuck on, money > 500 {
cout << “welcome” endl;
}
+ 1
It’s logical operators.
+ 1
Ayabonga Mpeta
Use *And(&&)* operator if you want both conditions to be true(that is age should be greater than 21 and money shoul also be greater than 500)
Use *Or(||)* operator if you want only one of the condition to be true(that is either age is greater than 21 OR money is greater than 500)
+ 1
Thanks for help Arsenic.
0
yeah ok
0
What exactly confuse you in logical operators?