ProAnswers.org

Write a C program to check whether the person is eligible to Vote or Not

 #include<stdio.h>

#include<conio.h>

void main()

{

int a;

clrscr();

printf(“enter the age\n”);

scanf(“%d”,&a);

if(a>=18)

printf(“eligible to vote”);

else

printf(“not eligible”);

getch();

}

Output:

enter the age:

21

eligible to vote