#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b;
cout<<"Enter your present age ";
cin>>a;
if (a>=18)
{ cout<<"You are Eligible to vote ";
}
else
{ b=18-a;
cout<<"You are not eligible to vote but after "<<b<<" years you will be eligible to vote ";
}
getch();
}
#include<conio.h>
void main()
{
clrscr();
int a,b;
cout<<"Enter your present age ";
cin>>a;
if (a>=18)
{ cout<<"You are Eligible to vote ";
}
else
{ b=18-a;
cout<<"You are not eligible to vote but after "<<b<<" years you will be eligible to vote ";
}
getch();
}
No comments:
Post a Comment