ad

Monday, February 24, 2025

C Program to Check Whether a People is Eligible to Vote or Not

                     C Program  



Q.1] C Program to Check Whether a People is Eligible to Vote or Not  

Example  :-

#include<stdio.h>
 #include<conio.h>
int main()
{
int age;
clrscr();
 printf("enter your age :-");
scanf("%d", &age);
if(age>=18)
{
printf("you are eligible to vote");
}
else
{
printf("you are not eligible for vote");
}
getch();
return 0;
}


Q.1 ]C Program to Check Whether a People is Eligible to Vote or Not  

 Program Output :- Run 1 time

enter your age :- 18 
you are eligible to vote 

 Program Output :- Run 2 Time

enter your age :-  15
you are  not eligible foe vote 


 Program Output :- Run 3 Time

enter your age :-  21
you are eligible to vote 

Related Post :-

type of css

php syntax

c program to check number prime or not

No comments:

Post a Comment