Write a program to check whether a person is eligible for vote or not.
//program to check whether a person is eligible for vote or not.
#include<stdio.h>
int main()
{
int age;
printf("enter your age\n");
scanf("%d", &age);
if(age>=18){
printf("you are eligible for vote");
}
else{
printf("you are not eligible for vote");
}
return 0;
}
Output:
enter your age
55
you are eligible for vote
--------------------------------
Process exited after 3.166 seconds with return value 0
Press any key to continue . . .
Comments
Post a Comment
Please do not enter any spam link in the comment box.