Table of Contents
Overview
Below is the program to check whether a person is eligible to vote or not.
REM Program to check if a person is eligible to vote or not
CLS
INPUT "Enter a person's age: "; age
IF age >= 18 THEN
PRINT "Person is eligible to vote"
ELSE
PRINT "Person is not eligible to vote"
END IF
END
Output
![Eligible to Vote](https://thinkshare.one/wp-content/uploads/2021/08/Eligible-to-Vote.png)
Explanation
To check if the person is eligible to vote or not, first, ask the user the age of the person and check if the age is greater than or equal to 18 (>=18), if the condition satisfies, display the person is eligible to vote else display not eligible.
More Programs
https://thinkshare.one/learn/programming/qbasic/