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