- #include<stdio.h>
- int main ()
- {
- int age,temp=0 ;
- while(1)
- {
- //User input here age
- printf("Enter Your Age Here\n");
- scanf("%d",&age);
- if( age >= 18 && age<100 )
- {
- printf("Congratulation !!! 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 or You are Not Mature \n\n" );
- printf("Wait %d Years For Vote .\n",temp );
- }
- }
- return 0;
- }
- OUTPUT :
- 1. Enter Your Age Here
- 34
- Congratulation !!! You Are Eligible For Voting
- 2. Enter Your Age Here
- 15
- You Not Are Eligible or You are Not Mature
- Wait 3 Years For Vote .
Write a program in C For Check You Are Eligible For Voting Or Not
Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated