Notification texts go here Contact Us Click here

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
  1. #include<stdio.h>
  2.  
  3. int main ()
  4.  
  5. {
  6.  
  7.     int age,temp=0 ;
  8.  
  9.     while(1)
  10.  
  11.     {
  12. //User input here age 
  13.  printf("Enter Your Age Here\n");
  14.  
  15.     scanf("%d",&age);
  16.  
  17.  if( age >= 18 && age<100 )
  18.  
  19.   {
  20.  
  21.      printf("Congratulation !!! You Are Eligible For Voting\n\n" );
  22.  
  23.     }
  24.  
  25.     else if( age >= 100 )
  26.  
  27.   {
  28.  
  29.      printf("You Are Eligible But We Suggest Take a Rest\n\n" );
  30.  
  31.     }
  32.  
  33.     else if(age<18)
  34.  
  35.     {
  36.  
  37.   temp = 18 - age; 
  38.  
  39.      printf("You Not Are Eligible or You are Not Mature \n\n" );
  40.  
  41.      printf("Wait %d Years For Vote .\n",temp );
  42.  
  43.     }
  44.  
  45.   }
  46.  
  47.    return 0;
  48.  
  49. }
  50.  
  51. OUTPUT :
  52.  
  53. 1Enter Your Age Here
  54.    34
  55. Congratulation !!! You Are Eligible For Voting
  56.  
  57.  
  58. 2Enter Your Age Here
  59.    15
  60. You Not Are Eligible or You are Not Mature 
  61.  
  62. Wait 3 Years For Vote .
  63.  
  64.  
  65.  

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.