Write a program to input age of any person and check he is eligible for voting or not.

In this program we input age of any person and check he is eligible for voting or not means we input a number by user and check number is greater than and equal to 18 then he is eligible for voting else not.
So let's start
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter age of person=");
scanf("%d",&a);
if(a>=18)
  printf("\nEligible for voting");
else
  printf("\nNot eligible for voting");
getch();
}


RELATED EXAMPLES 
  1. Write a program to input age of an employee and check he is retired or working.
  2. Write a program to input a number and check number is odd or even.
  3. Write a program to input two number and find smallest number.
  4.  Write a program to input two number and find highest number. 

    1.  Share and Comment. 
      Follow for recently updates.

    Comments

    Popular posts from this blog

    Write a program to input two digit number and check number is palindrome or not.

    Write a program to input speed of Royal Enfield and check it's running at economic speed or not.