#include<iostream.h>
#include<constream.h>
#include<string.h>
void main()
{
clrscr();
int age;
cout<<"enter your age:";
cin>>age;
if(age>=18)
{
cout<<"you are eligible for voting:";
}
else
{
cout<<"you are noneligible for voting:";
cout<<"wait for"<<18-age<<"year(s):";
}
getch();
}
Sunday, 7 December 2014
C++ program to check the person is eligible for voting or not
Posted by Madan
Posted on 13:57





