/* Use of Comparison Operator */

/* Author Name:Md.Naimul Hasan shohan */

 

#include<iostream>

using namespace std;

string comparison(int age)

{

  string str;

  if(age<18)

    str="You are a child";

  else if(age>=18 && age<65)

    str="You are an adult";

  else if(age>=65)

    str="You are a senior citizen";

    return str;

}

int main()

{

    int age;

    cout<<"Enter Your Age to know who You are:"<<endl;

    cin>>age;

    cout<<comparison(age);

 

}

 
     
  Back to Main Page