VOTING ELIGIBILITY
Code :
#include<stdio.h>
int main()
{
int age = 0;
printf("======================================\n");
printf("\t VOTING ELIGIBILITY\n");
printf("======================================\n\n");
printf("Enter your age : ");
scanf("%d", &age);
printf("\n");
if(age >= 18)
{
printf("You are eligible for voting.");
}
else
{
printf("Sorry you are not eligible for voting.\n");
printf("You have to wait %d years.\n", 18 - age);
}
printf("\n--------------------------------------");
return 0;
}
Come again Learn again !
« iCodeBuzz »
No comments:
Post a Comment