I'm kind of embarrassed to be asking this, but can anyone optimize/find a better way of doing this? The goal of this code is to create a menu based on the ownership status of cars. When one is selected, the program will have to know which one. The 0s and 1s relate to the ownership status of cars. Variables starting with CARIDEN relate to the unique identification number that each car has, and variables starting with CARNAM relate to the name of each car. Like I said, I'm not at all happy with this code, but with the time constraints of this contest, the fact is, if I don't ask for help I'll never get done in time. So, here's the code. If anyone can help, it would be much appreciated. Thanks.

**Code:**```
SELECT
```

det(9,1)

1→CONDA

maxYSLCTDATA

minY1,1,"00"→CHECKG

det(0)

det(20,255)

det(21,0)

det(22,255)

det(75,93)

det(18,CARNAMA,5,22)

det(18,CARNAMB,5,32)

det(18,CARNAMC,5,42)

det(18,CARNAMD,5,52)

det(18,CARNAME,5,62)

det(18,CARNAMF,5,72)

det(18,CARNAMG,5,82)

det(18,CARNAMH,5,92)

det(18,CARNAMI,5,102)

det(18,CARNAMJ,5,112)

det(18,CARNAMK,5,122)

det(18,CARNAML,5,132)

det(18,CARNAMM,5,142)

det(18,CARNAMN,5,152)

det(18,CARNAMO,5,162)

det(18,CARNAMP,5,172)

det(18,CARNAMQ,5,182)

det(18,CARNAMR,5,192)

det(18,CARNAMS,5,202)

det(18,CARNAMT,5,212)

det(11,1)

minY100,10→BACKG

2→X

20→Y

det(63,CHECKG,X,Y,100,10)

det(61,BACKG,200,70)

det(20,0)

det(21,255)

det(22,0)

det(11,1)

Repeat getKey(9)

det(57,BACKG,X,Y)

If getKey(1)

Y+10→Y

Pause 150

End

If getKey(4)

Y-10→Y

Pause 150

End

If Y>NUMBCARS*10+20

Y-20→Y

End

If Y<20

20→Y

End

det(61,BACKG,X,Y)

det(63,CHECKG,X,Y,100,10)

If Y=20

CARNAMA→CARNAMTEMP

CARIDENA→CARIDENTEMP

End

If Y=30

CARNAMB→CARNAMTEMP

CARIDENB→CARIDENTEMP

End

If Y=40

CARNAMC→CARNAMTEMP

CARIDENC→CARIDENTEMP

End

If Y=50

CARNAMD→CARNAMTEMP

CARIDEND→CARIDENTEMP

End

If Y=60

CARNAME→CARNAMTEMP

CARIDENE→CARIDENTEMP

End

If Y=70

CARNAMF→CARNAMTEMP

CARIDENF→CARIDENTEMP

End

If Y=80

CARNAMG→CARNAMTEMP

CARIDENG→CARIDENTEMP

End

If Y=90

CARNAMH→CARNAMTEMP

CARIDENH→CARIDENTEMP

End

If Y=100

CARNAMI→CARNAMTEMP

CARIDENI→CARIDENTEMP

End

If Y=110

CARNAMJ→CARNAMTEMP

CARIDENJ→CARIDENTEMP

End

If Y=120

CARNAMK→CARNAMTEMP

CARIDENK→CARIDENTEMP

End

If Y=130

CARNAML→CARNAMTEMP

CARIDENL→CARIDENTEMP

End

If Y=140

CARNAMM→CARNAMTEMP

CARIDENM→CARIDENTEMP

End

If Y=150

CARNAMN→CARNAMTEMP

CARIDENN→CARIDENTEMP

End

If Y=160

CARNAMO→CARNAMTEMP

CARIDENO→CARIDENTEMP

End

If Y=170

CARNAMP→CARNAMTEMP

CARIDENP→CARIDENTEMP

End

If Y=180

CARNAMQ→CARNAMTEMP

CARIDENQ→CARIDENTEMP

End

If Y=190

CARNAMR→CARNAMTEMP

CARIDENR→CARIDENTEMP

End

If Y=200

CARNAMS→CARNAMTEMP

CARIDENS→CARIDENTEMP

End

If Y=210

CARNAMT→CARNAMTEMP

CARIDENT→CARIDENTEMP

End

det(18,CARNAMTEMP,5,Y+2)

det(11,1)

End

Lbl SLCTDATA

0→XSTEP

0→ZORCAEON

1→FERBERLIN

0→MAZDARATI

1→ZONDAVICIC

5→Y

Σy²20→CARNAMA

Σy²20→CARNAMB

Σy²20→CARNAMC

Σy²20→CARNAMD

Σy²20→CARNAME

Σy²20→CARNAMF

Σy²20→CARNAMG

Σy²20→CARNAMH

Σy²20→CARNAMI

Σy²20→CARNAMJ

Σy²20→CARNAMK

Σy²20→CARNAML

Σy²20→CARNAMM

Σy²20→CARNAMN

Σy²20→CARNAMO

Σy²20→CARNAMP

Σy²20→CARNAMQ

Σy²20→CARNAMR

Σy²20→CARNAMS

Σy²20→CARNAMT

Σy²20→CARNAMU

Σy²20→CARNAMV

Σy²20→CARNAMW

Σy²20→CARNAMX

Σy²20→CARNAMY

Σy²20→CARNAMZ

Σy²20→CARNAMTEMP

Repeat XSTEP=25

If ZORCAEON=CONDA and XSTEP=0

NUMBCARS+1→NUMBCARS

"Zorca Eon"→CARNAMTEMP

1→CARIDEN

End

If FERBERLIN=CONDA and XSTEP=1

NUMBCARS+1→NUMBCARS

"Ferrotti Berlinera"→CARNAMTEMP

2→CARIDEN

End

If MAZDARATI=CONDA and XSTEP=2

NUMBCARS+1→NUMBCARS

"Mazda Rati"→CARNAMTEMP

3→CARIDEN

End

If ZONDAVICIC=CONDA and XSTEP=3

NUMBCARS+1→NUMBCARS

"Zonda Vicic"→CARNAMTEMP

4→CARIDEN

End

If NISSACITY=CONDA and XSTEP=4

NUMBCARS+1→NUMBCARS

"Nissa Cityscape"→CARNAMTEMP

5→CARIDEN

End

If LAGANEHUERA=CONDA and XSTEP=5

NUMBCARS+1→NUMBCARS

"Lagane Huera"→CARNAMTEMP

6→CARIDEN

End

If ZORCACAYAN=CONDA and XSTEP=6

NUMBCARS+1→NUMBCARS

"Zorca Cayan"→CARNAMTEMP

7→CARIDEN

End

If ZORCANOT=CONDA and XSTEP=7

NUMBCARS+1→NUMBCARS

"Zorca 912"→CARNAMTEMP

8→CARIDEN

End

If MAZDAXR=CONDA and XSTEP=8

NUMBCARS+1→NUMBCARS

"Mazda X7R"→CARNAMTEMP

9→CARIDEN

End

If BIMMERM=CONDA and XSTEP=9

NUMBCARS+1→NUMBCARS

"Bimmer 3M"→CARNAMTEMP

10→CARIDEN

End

If DOMVIPPER=CONDA and XSTEP=10

NUMBCARS+1→NUMBCARS

"Dom Vipper"→CARNAMTEMP

11→CARIDEN

End

If OTTIRS=CONDA and XSTEP=11

NUMBCARS+1→NUMBCARS

"Otti RS5"→CARNAMTEMP

12→CARIDEN

End

If OTTITT=CONDA and XSTEP=12

NUMBCARS+1→NUMBCARS

"Otti TT"→CARNAMTEMP

13→CARIDEN

End

If VOLVERTF=CONDA and XSTEP=13

NUMBCARS+1→NUMBCARS

"Volver 420"→CARNAMTEMP

14→CARIDEN

End

If DELARO=CONDA and XSTEP=14

NUMBCARS+1→NUMBCARS

"DeLaro"→CARNAMTEMP

15→CARIDEN

End

If ZONDANS=CONDA and XSTEP=15

NUMBCARS+1→NUMBCARS

"Zonda NS"→CARNAMTEMP

16→CARIDEN

End

If MERCSLA=CONDA and XSTEP=16

NUMBCARS+1→NUMBCARS

"Merc SL₆00"→CARNAMTEMP

17→CARIDEN

End

If MERCSLB=CONDA and XSTEP=17

NUMBCARS+1→NUMBCARS

"Merc SL₆5 MAG"→CARNAMTEMP

18→CARIDEN

End

If MITGTO=CONDA and XSTEP=18

NUMBCARS+1→NUMBCARS

"Mitzer GTO"→CARNAMTEMP

19→CARIDEN

End

If MITRAJ=CONDA and XSTEP=19

NUMBCARS+1→NUMBCARS

"Mitzer Raja"→CARNAMTEMP

20→CARIDEN

End

If NISSAVX=CONDA and XSTEP=20

NUMBCARS+1→NUMBCARS

"Nissa 300VX"→CARNAMTEMP

21→CARIDEN

End

If OPELSPEE=CONDA and XSTEP=21

NUMBCARS+1→NUMBCARS

"Opel Speeder"→CARNAMTEMP

22→CARIDEN

End

If LAROP=CONDA and XSTEP=22

NUMBCARS+1→NUMBCARS

"Laro P2"→CARNAMTEMP

23→CARIDEN

End

If FERROLE=CONDA and XSTEP=23

NUMBCARS+1→NUMBCARS

"Ferrotti LeFerrotti"→CARNAMTEMP

24→CARIDEN

End

If CUSTOMA=CONDA and XSTEP=24

NUMBCARS+1→NUMBCARS

"Custom 1"→CARNAMTEMP

25→CARIDEN

End

If CUSTOMB=CONDA and XSTEP=25

NUMBCARS+1→NUMBCARS

"Custom 2"→CARNAMTEMP

26→CARIDEN

End

XSTEP+1→XSTEP

If NUMBCARS=1

CARIDEN→CARIDENA

CARNAMTEMP→CARNAMA

End

If NUMBCARS=2

CARIDEN→CARIDENB

CARNAMTEMP→CARNAMB

End

If NUMBCARS=3

CARIDEN→CARIDENC

CARNAMTEMP→CARNAMC

End

If NUMBCARS=4

CARIDEN→CARIDEND

CARNAMTEMP→CARNAMD

End

If NUMBCARS=6

CARIDEN→CARIDENF

CARNAMTEMP→CARNAMF

End

If NUMBCARS=7

CARIDEN→CARIDENG

CARNAMTEMP→CARNAMG

End

If NUMBCARS=8

CARIDEN→CARIDENH

CARNAMTEMP→CARNAMH

End

If NUMBCARS=9

CARIDEN→CARIDENI

CARNAMTEMP→CARNAMI

End

If NUMBCARS=10

CARIDEN→CARIDENJ

CARNAMTEMP→CARNAMJ

End

If NUMBCARS=11

CARIDEN→CARIDENK

CARNAMTEMP→CARNAMK

End

If NUMBCARS=12

CARIDEN→CARIDENL

CARNAMTEMP→CARNAML

End

If NUMBCARS=13

CARIDEN→CARIDENM

CARNAMTEMP→CARNAMM

End

If NUMBCARS=14

CARIDEN→CARIDENN

CARNAMTEMP→CARNAMN

End

If NUMBCARS=15

CARIDEN→CARIDENO

CARNAMTEMP→CARNAMO

End

If NUMBCARS=16

CARIDEN→CARIDENP

CARNAMTEMP→CARNAMP

End

If NUMBCARS=17

CARIDEN→CARIDENQ

CARNAMTEMP→CARNAMQ

End

If NUMBCARS=18

CARIDEN→CARIDENR

CARNAMTEMP→CARNAMR

End

If NUMBCARS=19

CARIDEN→CARIDENS

CARNAMTEMP→CARNAMS

End

If NUMBCARS=20

CARIDEN→CARIDENT

CARNAMTEMP→CARNAMT

End

If NUMBCARS=21

CARIDEN→CARIDENU

CARNAMTEMP→CARNAMU

End

If NUMBCARS=22

CARIDEN→CARIDENV

CARNAMTEMP→CARNAMV

End

If NUMBCARS=23

CARIDEN→CARIDENW

CARNAMTEMP→CARNAMW

End

If NUMBCARS=24

CARIDEN→CARIDENX

CARNAMTEMP→CARNAMX

End

If NUMBCARS=25

CARIDEN→CARIDENY

CARNAMTEMP→CARNAMY

End

If NUMBCARS=26

CARIDEN→CARIDENZ

CARNAMTEMP→CARNAMZ

End

End

Return

Pause

det(1)