Ask coding questions

← Back to all posts
QBasic
mrsd

CASE SELECT code does not work:

' Code that will correctly print out your status, depending on your age
'
INPUT "What is your age? ";age
PRINT "Thank You"
PRINT
PRINT "You are a";
SELECT CASE age
CASE IS >60
PRINT " pensioner"
CASE IS > 14
PRINT "n adult"
CASE ELSE
PRINT " child"
END SELECT
END

Only answer I get is you are a child, regardless of the input.

Voters
krithikapradeep
kalyanroy1
CandaceJessica
mamtamamodiya
HannahByrne
mrsd
Comments
hotnewtop
Dhruv-Monga

you know your programing is wrong

themaka

It's easier to help if you share the repl.