Computer Science, asked by kasivis17, 20 days ago

write a c ++ program to accept the age and print whether the person is major or minor​ ​

Answers

Answered by adityaray38970
1

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;

}

elsey

{

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;

}

here's the answer

Similar questions