C Program For Check You Are Eligible For Voting Or Not


Program Code:

#include<stdio.h>
int main ()
{
int age,temp=0 ;
while(1)
{ 
printf("Enter Your Age Here\n");
scanf("%d",&age);
if( age >= 18 && age<100 )
{
printf("Congrats! You Are Eligible For Voting\n\n" );
}
else if( age >= 100 )
{
printf("You Are Eligible But We Suggest Take a Rest\n\n" );
}
else if(age<18)
{
temp = 18 - age; 
printf("You Not Are Eligible For Voting \n\n" );
printf("Wait %d Years For Vote .\n",temp );
}
}
return 0;
}


To learn more about programming and coding visit our website. PDF study materials also available on our website.

Log on to: www.thecode11.com