Write a c++ program to input an age and check eligibility for voting.
Answers
Answered by
12
Sample Program to check eligibility for voting:
#include<iostream.h>
using namespace std;
int main()
{
int age;
cout<<"Enter the age of candidate: " <<endl;
cin>>age;
if(age > 18)
{
cout<<"Eligible to vote ";
}
else
{
cout<<"Not eligible to vote" ;
}
return 0;
}
<!..Hope it helps you ..>!
Attachments:
Answered by
3
Answer:
Write a c++ program to input an age and check eligibility for voting.
Explanation:
Thanks
Similar questions