Computer Science, asked by suhanmurmu838, 7 months ago

Write a program to display whether a person is eligible to vote or not. Q BASIC​

Answers

Answered by BrainlyProgrammer
41

Answer:

CLS

INPUT N

IF N>=18 THEN

PRINT "ELIGIBLE TO VOTE"

ELSE

PRINT "NOT ELIGIBLE TO VOTE"

END IF

END

HOPE IT HELPS U....MARK ME BRAINLIEST

Answered by anindyaadhikari13
35

Question:-

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

Program :-

CLS

INPUT "ENTER YOUR AGE: ";A

IF A>=18 THEN

PRINT "YES. YOU ARE ELIGIBLE TO VOTE. "

ELSE

PRINT "OOPS, YOU ARE NOT ELIGIBLE TO VOTE."

END IF

END

CLS stands for clear screen..It clears the screen.

On the next line, we will input the age of the person and on the next line we will check whether the age of the person is greater than or equal to 18. If it's true then we will print this line "u r eligible" else not.

Similar questions