Computer Science, asked by farukadambuba99, 2 months ago

Write a program on c++ to enter an age of a person and check if the age entered is above sixty print senior citizen else print not a senior citizen

Answers

Answered by vidyambhavya
2

Answer:

#include<iostream>

using namespace std;

int main()

{

int age;

cout<<"Enter your age: ";

cin>>age;

//person is teenager or not

//>=13 and <=19

if(age>=13 && age<=19)

{

 cout<<"Person is Teenager"<<endl;

}

else

{

 cout<<"Person is not a Teenager"<<endl;

}

//condition to check voting eligility

if(age>=18)

{

 cout<<"Personl is eligible for voting"<<endl;

}

else

{

 cout<<"Person is not eligible for voating"<<endl;

}

return 0;

}

Explanation:

was this answer helpfull

Similar questions