Program to print eligibility to vote In C

Program to print eligibility to vote In C: In this post we will use if else statement to check whether the user is eligible to vote or not.

Code For Program to print eligibility to vote In C

#include<stdio.h>
#include<conio.h>
int main()
{
int age;
printf("Enter age:");
scanf("%d", &age);
if(age>=18)
printf("You can eligible for vote!");
else
printf("You cannot eligible for vote");
return 0;
}

Output:

Enter age:20
You can eligible for vote!
Enter age:15
You cannot eligible for vote!

Read: Program to print the number of days in a month using switch statements


If You Like This Page Then Make Sure To Follow Us on Facebook, G News and Subscribe Our YouTube Channel. We will provide you updates daily.
Shares
facebook sharing button Share
twitter sharing button Tweet
whatsapp sharing button Share
telegram sharing button Share
pinterest sharing button Pin

Leave a Comment