//Write a program to check eligibility of a person for Vote or NOt
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int age;
cout<<"Check Wheather a Man Eligible For Vote or Not";
cout<<"\n\nEnter the age : ";
cin>>age;
if(age>=18)
{
cout<<"Permitted";
cout<<"\nWelcom";
}
else
cout<<"Not Permitted";
cout<<"\n\n Press any key For Exit....";
getch();
}
Output:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int age;
cout<<"Check Wheather a Man Eligible For Vote or Not";
cout<<"\n\nEnter the age : ";
cin>>age;
if(age>=18)
{
cout<<"Permitted";
cout<<"\nWelcom";
}
else
cout<<"Not Permitted";
cout<<"\n\n Press any key For Exit....";
getch();
}
Output:
No comments:
Post a Comment