C Program For Check You Are Eligible For Voting Or Not

C Program For Check You Are Eligible For Voting Or Not: First, we take the input the age of the person to check eligibility for voting.We write the condition that is input > 18 then, if true we print person is eligible for voting.Else a person is not eligible.

C Program For Check You Are Eligible For Voting Or Not

#include<stdio.h>
int main()
{
int age ;
printf("Enter the age of the Person: ");

scanf("%d",&age);
if (age>=18)
{
printf("Person is Eligible for Voting");
}
else
{
printf("Person is not Eligibal for Voting\n");

}
return 0;
}

Output of Program

Enter the age of the Person: 26
Person is Eligible for Voting