Computer Science, asked by EnoshGonmei, 1 year ago

Write a c++ program to input an age and check eligibility for voting.

Answers

Answered by siddhartharao77
12

Sample Program to check eligibility for voting:

#include<iostream.h>

using namespace std;

int main()

{

int age;

cout<<"Enter the age of candidate: " <<endl;

cin>>age;

if(age > 18)

{

cout<<"Eligible to vote ";

}

else

{

cout<<"Not eligible to vote" ;

}

return 0;

}


<!..Hope it helps you ..>!

Attachments:
Answered by sparshsingh0506
3

Answer:

Write a c++ program to input an age and check eligibility for voting.

Explanation:

Thanks

Similar questions