Write a program to check whether a person is eligible for vote or not.

 //program to check whether a person is eligible for vote or not.

#include<stdio.h>


int main()


{

int age;

printf("enter your age\n");

scanf("%d", &age);

if(age>=18){

printf("you are eligible for vote");

}

else{

printf("you are not eligible for vote");

}

return 0;

}

Output:

enter your age

55

you are eligible for vote

--------------------------------

Process exited after 3.166 seconds with return value 0

Press any key to continue . . .

Comments

Popular posts from this blog

Write a program to check if a number is prime or not.

write a program (keep taking numbers as input from user until user enters an Odd number)

write a program to print all the odd numbers from 1 to 100.