fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6.  
  7.  
  8. int x = 18;
  9.  
  10.  
  11. if(x%2 == 0 && 2<=x<=5){
  12.  
  13. cout << "x lies between 2 and 5" << endl;
  14.  
  15. }
  16. if(x%2 == 0 && 6<=x<=20){
  17.  
  18. cout << "x lies between 6 and 20" << endl;
  19.  
  20. }
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
x lies between 2 and 5
x lies between 6 and 20