Help me in solving CSCV202A problem

My issue

How can i solve this problem please give hint in solving Age limit problem .

My code

// Update the program below to solve the problem

#include <bits/stdc++.h>
using namespace std;

int main() 
{
 int t;
 cin>>t;
 while(t--)
  { 
   int X,Y,A;
   //Accept 3 integers inputs.
   cin>>X>>Y>>A;   
   if()


   }
 return 0;
}


   

Learning course: C++ for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

@shubhammishrao
it can be done using simple if else.
Like this.

if(A >= X && A < Y){
            cout << "YES" << endl;
        }
        
        else{
            cout << "NO"<<endl;
        }
1 Like