Program to check whether a person is eligible to vote or not | SpiderShell
![]() |
| Program to check whether a person is eligible to vote or not | SpiderShell |
Program :
#include<stdio.h>
int main()
{
int age;
printf("Enter your age : ");
scanf("%d",&age);
if(age>=18)
{
printf("You are eligible for vote");
scanf("%d",age);
}
else
{
printf("You are not eligible for vote");
scanf("%d",age);
}
return 0;
}
Output :
Enter your age : 21
you are eligible for vote.

0 Comments:
Post a Comment