Write a C program to check whether a person is eligible for voting or not?

 Que :  C program to check whether a person is eligible for voting or               not?


Ans : 


#include <stdio.h>

 

int main()

{

   int a;

   printf("Enter Your age : ");

   scanf("%d",&a);

   if (a >=18)

   {

       printf("you are  eligible for voting  ");

   }

   else

   {

       printf("You are not  eligible for voting ");

   }

   return 0;

}

Input :



Output :







Comments