C program to check eligibility for voting

Program:
#include<stdio.h>
int main()
{
 int age;
 printf("Enter your age\n");
 scanf("%d",&age);
 if(age>=18)
 {
  printf("You are eligible for voting");
 }
 else
 {
  printf("You are not eligible for voting");
 }
}
Output:

Related Links:

check both are equal
Check number is positive or negative
grade of student
voting program in c
Previous Post Next Post