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
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
Computer Science,
1 month ago
English,
1 month ago
Math,
1 month ago
Accountancy,
2 months ago
Math,
2 months ago