0
help!
hello brothers! please tell me once, if i write like this """"if(10<x>15) {cout<<yes;}""""" it's correct? but it's not worked? how i must write it?
3 Answers
+ 6
Assuming you mean if x is less than 10 or more than 15:
if (x<10 || x>15) {
cout<<"yes";
}
|| is the OR operator, meaning if either condition is true the statement will be executed.
+ 5
Liam is right, but I suppose you probably mean "x between 10 and 15"
In this case it's (x>10 && x<15)
0
thanks brother!